|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54586 not documented that exec returns -1 if pcntl_signal(SIGCHLD,.. is used
Submitted: 2011-04-21 11:02 UTC Modified: 2011-07-02 04:12 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: johncart at cisco dot com Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: 5.3.6 OS: n/a
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
24 + 17 = ?
Subscribe to this entry?

 [2011-04-21 11:02 UTC] johncart at cisco dot com
If pcntl_signal(SIGCHLD,... has been used then exec() will always have a return 
code of -1. This gotcha should be documented.

Someone's added a comment with details:

Test script:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-02 08:15 UTC]
I feel that this edge-case is obscure enough that it's not really worth 

The reason why exec() will return false when binding a handler to SIGCHLD is 
that the handler is intercepting the result before it can "bubble" down to the 
native signal handler.

Anyone with the expertise to be installing POSIX signal handlers should already 
be aware that they're intercepting process behaviours, and should be able to 
code around this.
 [2011-07-02 04:12 UTC]
-Status: Open +Status: Wont fix
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 09:01:33 2024 UTC