Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 contemplating the Monastery: (17)
As of 2015-07-31 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (282 votes), past polls