Garayed.com  

Go Back   Garayed.com > PHP
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-15-2008, 02:02 PM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-16-2008, 12:49 AM
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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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

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



All times are GMT. The time now is 11:44 PM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.