My problem is that if in one iteration the timeout really worked the process run by qx is still will be running in the background! Is there a way of killing this process too right after the eval will finish?eval { local $SIG{ALRM} = sub {die "Cant get node's time ($host)\n"}; alarm 5; @out = qx {$cmd}; if ($out[1] !~ /OVO Managed Node status :/) { print "Detected error for node $host\n"; } alarm 0; };
In reply to eval leaving processess behind by leonidlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |