Thanks for your input, understanding forks better, I realised that since I didnt want control of the child, i used 'exec()':
FORK: { $child = fork; if (defined $child) { if($child == 0){ exec("/usr/local/bin/monster", "-i$id", "$filePath$file") or die "couldn't exec monster: $!"; } }elsif ($! == EAGAIN) { sleep 5; redo FORK; }else { die "Can't fork: $!\n"; } }
However, now the child refuses to exit, which is strange. It wont even 'die' and print the error message if any.
I tried this very same thing with pemungkah's suggestion, and again it happened, the child won't exit.
Repeated requests creates new children, but they are all hanging there...
Anyone?
Sam
In reply to Re: Re: Reaping Zombies (dont wanna wait)
by Anonymous Monk
in thread Reaping Zombies (dont wanna wait)
by seaver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |