PHP 4.0 Bug #9040: Exec sets return_val to -1 when compiled with "--enable-sigchild"
| From: | jase at sensis dot com | Date: | Wed, 31 Jan 2001 21:38:35 +0000 |
| Subject: | PHP 4.0 Bug #9040: Exec sets return_val to -1 when compiled with "--enable-sigchild" | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-45494@lists.php.net to get a copy of this message | ||
From: jase@sensis.com
Operating system: Linux 2.2.17
PHP version: 4.0.3pl1
PHP Bug Type: Program Execution
Bug description: Exec sets return_val to -1 when compiled with "--enable-sigchild"
I was encouraged to submit this as a bug report...
I acutally compiled the source from Debian's archive, with the latest security fix (which I
think it found in 4.0.4pl1). I was having trouble with oracle support, so I configured with
"--enable-sigchild". That did not help my problem.
I finally went back to my older oracle libraries, and was able to get them to work, but left
"--enable-sigchild" configured in. Then I noticed that all of my exec functions were
setting return_val (the third parameter) to -1, indicating an error.
I can include an strace of the problem if needed. I think that the problem was that there were 2
wait4 system calls, one after another. The second one would return a -1. But, I'm not sure,
and I'm not much of a programmer.
Here is the strace after the exec process has finished exiting.
[pid 25359] _exit(0) = ?
<... read resumed> "", 4096) = 0
--- SIGCHLD (Child exited) ---
wait4(-1, NULL, WNOHANG, NULL) = 25359
wait4(-1, NULL, WNOHANG, NULL) = -1 ECHILD (No child processes)
Hope this helps someone.
Let me know if you need any more info.
Jase
--
Edit Bug report at: http://bugs.php.net/?id=9040&edit=1