in reply to Re: Reaping Zombies (dont wanna wait)
in thread Reaping Zombies (dont wanna wait)
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Reaping Zombies (dont wanna wait)
by seaver (Pilgrim) on Jun 11, 2003 at 18:55 UTC | |
|
Re: Re: Re: Reaping Zombies (dont wanna wait)
by pemungkah (Priest) on Jun 24, 2003 at 21:19 UTC |