On Tue, Dec 09, 2003 at 01:04:01AM +0100, [EMAIL PROTECTED] wrote: > eval { > local $SIG{ALRM} = sub { die "alarm\n" }; > alarm 10; > system($prog, @args); > alarm 0; > }; > if($@ =~ /alarm/) { > # have to kill $prog; # I tried with 'use POSIX qw/sys_wait_h/;' my $kid = waitpid -1, WNOHANG; print "$kid\n"; kill 15, $kid; > }
But this doesn't work, because waitpid returns 0 while the child is running. regards, Mik -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>