Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Backticks and SIGALRM

by dwm042 (Priest)
on Aug 20, 2007 at 13:17 UTC ( #633811=note: print w/replies, xml ) Need Help??


in reply to Backticks and SIGALRM

I've seen similar issues in shell scripting, and the solution I settled on was similar to what moritz is suggesting. We opened a FIFO queue, forked the process into a parent and child. The child launched the unreliable app, and helped funnel the output into the FIFO. Parent would read the FIFO and also set a timer. If the child lived longer than the time set on the timer, the child process was killed.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://633811]
help
Chatterbox?
[jedikaiti]: Hi, Monks
[marto]: heya jedikaiti!
[jedikaiti]: Cute Robot!
[jedikaiti]: How's life, marto?
[marto]: I saw this robot the other day, pretty fancy stuff. Things are pretty good jedikaiti, improving :) How are things with you?
[jedikaiti]: Doing OK, but a little achy this AM - I think the cats were using me as a wrestling mat and mattress while I was asleep last night.

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (18)
As of 2017-07-25 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (374 votes). Check out past polls.