fork

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-15-2008
chri
 
Posts: n/a
Default fork

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
Reply With Quote
  #2 (permalink)  
Old 06-16-2008
Vince Morgan
 
Posts: n/a
Default Re: fork


"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


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:25 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0