Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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 perldoc.perl.org.

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?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[Corion]: I see a download link there?
[Corion]: (at least the curl stuff is in a download link)
[Corion]: Also, I think the OPs problem is on their intranet and not on the internet (also, they should likely use WWW::Mechanize instead, which knows about cookie)
[1nickt]: yes, could be.
[1nickt]: I don;t see the link , definitely, after reloading the node
[1nickt]: Is it possible to disable it?
[Discipulus]: if you mean [download] after the code it is there 1nickt
[1nickt]: yes, Corion sees it too, and I see it when not logged in.
[Corion]: I think you can disable download links in your settings?
[1nickt]: Looking in settings to see if I disabled it in my profile ...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2017-05-23 18:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?