PHP 4.0 Bug #9040 Updated: Exec sets return_val to -1 when compiled with "--enable-sigchild"

From: Date: Thu, 22 Feb 2001 10:22:12 +0000
Subject: PHP 4.0 Bug #9040 Updated: Exec sets return_val to -1 when compiled with "--enable-sigchild"
Groups: php.dev 
Request: Send a blank email to php-dev+get-47233@lists.php.net to get a copy of this message
ID: 9040 Updated by: stas Reported By: jase@sensis.com Old-Status: Open Status: Duplicate Bug Type: Program Execution Assigned To: Comments: see #8992 Previous Comments: --------------------------------------------------------------------------- [2001-01-31 16:38:35] jase@sensis.com 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 --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9040&edit=2

« previous php.dev (#47233) next »