This is a discussion on fork within the PHP Language forums, part of the PHP Programming Forums category; I have a script that forks some child process! When the child finish exit with exit($i) function. The problem ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have a script that forks some child process! When the child finish
exit with exit($i) function. The problem is that from the parent i can't see the return value $i of the process! I use the pcntl_waitpid($status) and pcntl_wifexited($status) but the status returned is always 1. How can the parent process see if the child has exit? Thanks |
|
|||
|
"chri" <christian.pasin@tiscali.it> wrote in message news:48552109$0$29979$5fc30a8@news.tiscali.it... > I have a script that forks some child process! When the child finish > exit with exit($i) function. The problem is that from the parent i can't > see the return value $i of the process! I use the pcntl_waitpid($status) > and pcntl_wifexited($status) but the status returned is always 1. How > can the parent process see if the child has exit? Thanks I have no idea what you are doing really, but I think 'return()' might be more useful to you than 'exit()'. Vince |