![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Re: system() with timeoutby waswas-fng (Curate) |
on Mar 18, 2004 at 16:15 UTC ( [id://337721]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|