Re: Bug #17538 proc_close() doesn't return exit value of process
| From: | Wez Furlong | Date: | Wed, 12 Jun 2002 21:46:35 +0000 |
| Subject: | Re: Bug #17538 proc_close() doesn't return exit value of process | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-85179@lists.php.net to get a copy of this message | ||
Hi Kim,
Do a cvs diff -u and post the patch to the list with [PATCH] in the subject;
CC me directly.
I'll try and apply it over the weekend, unless someone else here applies
it for you in the meantime.
Thanks for your extensive testing of proc_open/proc_close :-)
--Wez.
On 05/06/02, "Kim Saunders" <kims@contrail.com.au> wrote:
> int wstatus;
> pid_t child, wait_pid;
>
> child = (pid_t)rsrc->ptr;
>
> do {
> wait_pid = waitpid(child, &wstatus, 0);
> } while (wait_pid == -1 && errno == EINTR);
>
> if (wait_pid == -1)
> FG(pclose_ret) = -1;
> else
> FG(pclose_ret) = WEXITSTATUS(wstatus);
>
> Now, it would be great if a PHP developer could apply this, or something
> along these lines, to the source tree to make proc_close() work (and
> close my bug!). As I say, I'm no PHP developer, nor even a particularly
> good C programmer, so there may well be other things to consider when
> applying a fix that I've missed, but this worked for me :)
>
> Thanks,
>
> KimS
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php