Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How to run a command, gather its output and kill it after a specified time?

by moritz (Cardinal)
on Feb 15, 2012 at 14:00 UTC ( #953956=note: print w/ replies, xml ) Need Help??


in reply to How to run a command, gather its output and kill it after a specified time?

Maybe I'm missing the point here, but if you don't want the script to die in case the alarm triggers, maybe just remove the respective call to die?

I also recommend looking at IPC::Run, which also has timeouts.


Comment on Re: How to run a command, gather its output and kill it after a specified time?
Re^2: How to run a command, gather its output and kill it after a specified time?
by blindluke (Scribe) on Feb 15, 2012 at 14:56 UTC

    I want the script (my_stubborn_shell) to be killed after the timeout (as this script does not exit gracefully), but then, when it's killed, I want to have the output that my_stubborn_shell sent to STDOUT, or an indication that it did not print anything.

    regards,
    Luke Jefferson

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2014-08-22 14:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (158 votes), past polls