Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

How do I make a system() exit on control-C?

by faq_monk (Initiate)
on Oct 08, 1999 at 00:29 UTC ( #748=perlfaq nodetype: print w/ replies, xml ) Need Help??

Current Perl documentation can be found at

Here is our local, out-dated (pre-5.6) version:

You can't. You need to imitate the system() call (see the perlipc manpage for sample code) and then have a signal handler for the INT signal that passes the signal on to the subprocess. Or you can check for it:

    $rc = system($cmd);
    if ($rc & 127) { die "signal death" } 

Log In?

What's my password?
Create A New User
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2015-11-27 04:01 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (717 votes), past polls