Re: fork/spawnzombie question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bruce wrote:

> Hi Nathan/Torok...
> 
> Hey guys... got a bit of a question.
> 
> I'm playing around with the php/for/pcntl_exec functions and I've got
> a process that spawns off a bunch of child processes. Unfortunately,
> I'm getting to where I have 100's of zombie child processes that I can
> see from the linux/processTBL.
> 
> I don't want to have my master loop do a waitpid() call, as it would
> block on the wait for one of the child processes to exit. 

No, it wouldn't - just use WNOHANG:

pcntl_waitpid( -1, $status, WNOHANG );


/Per Jessen


-- 
Per Jessen, Zürich (-0.9°C)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux