Dear Monks
i have problem in calling a shell script with in my perl program, here is what i need
perl script should call shell script for which i use system,but shell script which gets called needs ctrl-c at the end to terminate
if i press ctrl-c , my main perl script is getting terminated.
pls suggest on above, i tried fork but not really familer with that if i can use.
pls see sample code below.
#!/usr/bin/perl
use strict;
use warnings;
# i have skipped many steps here for ease
system("a2interf -i $t_dir -B -L lance_sg11");
# above call needs ctrl-c to be terminated
# i.e. script a2interf needs ctrl-c to terminate
system call should terminate with ctrl-c , how can i proceed with my perl program after system call
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.