|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: johncart at cisco dot com
New email:
PHP Version: OS:


 [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: Mon May 27 00:01:31 2024 UTC