Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: system() with timeout

by waswas-fng (Curate)
on Mar 18, 2004 at 16:15 UTC ( [id://337721]=note: print w/replies, xml ) Need Help??


in reply to Re: system() with timeout
in thread system() with timeout

One thing I have been bitten on before using IPC::Run is pty issues on heavy loaded machines -- it caused a hard to track down error for me. from the pod:
=item pty Support

If you need pty support, IPC::Run should work well enough most of the time, but IO::Pty is being improved, and IPC::Run will be improved to use IO::Pty's new features when it is release. The basic problem is that the pty needs to initialize itself before the parent writes to the master pty, or the data written gets lost. So IPC::Run does a sleep(1) in the parent after forking to (hopefully) give the child a chance to run. This is a kludge that works well on non heavily loaded systems :(.


-Waswas


Update: I am not saying its a bad module, just that I have hit the pty issue before and it was a PITA to track down. My fix was to change the sleep 1 to sleep 2 in the module, but there is still a race condition there you just make it a little less likely to happen.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2025-06-18 02:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.