in reply to Re: Segmentation Fault
in thread Segmentation Fault
eval { local $SIG{ALRM} = sub { die "alarm clock restart" }; alarm 10; qx/$string/; alarm 0; }; if ($@ and $@ !~ /alarm clock restart/) { die }
will genearate zombies as described in docs:
If the operation being timed out is system() or qx(), this technique is liable to generate zombies. If this matters to you, you'll need to do your own fork() and exec(), and kill the errant child process.
Because I need to capture output from command $string I can't use exec() command instead of backticks qx//. So this seems to be litle bit problematic.
Anybody know? THX
Li Tin O've Weedle
mad Tsort's philosopher
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Segmentation Fault
by virtualsue (Vicar) on Mar 07, 2002 at 17:35 UTC |