Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: SIGINT in system() with shell metachars

by IlyaM (Parson)
on Jun 25, 2003 at 16:03 UTC ( #268889=note: print w/ replies, xml ) Need Help??


in reply to SIGINT in system() with shell metachars

Try IPC::Run (in general everytime you think you need a better interface to external program execution then offered by Perl builtins you should use IPC::Run).

# UNTESTED CODE use IPC::Run qw(start); my $h = start([qw(prog1 file1)], '|', [qw(filter -v), $version], "> $tmpfile", "2>&1"); $h->finish; # returns exist values of each child process which you can use # to find signal that killed each child process my @results = $h->full_results;

--
Ilya Martynov, ilya@iponweb.net
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org


Comment on Re: SIGINT in system() with shell metachars
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://268889]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2014-07-12 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (241 votes), past polls