|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9040 Exec sets return_val to -1 when compiled with "--enable-sigchild"
Submitted: 2001-01-31 16:38 UTC Modified: 2001-02-22 18:42 UTC
From: jase at sensis dot com Assigned:
Status: Closed Package: Program Execution
PHP Version: 4.0.3pl1 OS: Linux 2.2.17
Private report: No CVE-ID: None
 [2001-01-31 16:38 UTC] jase at sensis dot 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.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-22 05:22 UTC]
see #8992
 [2001-02-22 18:42 UTC]
Fixed in CVS

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 15:01:28 2024 UTC