Doc #54586 [Opn]: not documented that exec returns -1 if pcntl_signal(SIGCHLD,.. is used
| From: | frozenfire@php.net | Date: | Mon, 02 May 2011 06:15:25 +0000 |
| Subject: | Doc #54586 [Opn]: not documented that exec returns -1 if pcntl_signal(SIGCHLD,.. is used | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-6333@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54586&edit=1
ID: 54586
Updated by: frozenfire@php.net
Reported by: johncart at cisco dot com
Summary: not documented that exec returns -1 if
pcntl_signal(SIGCHLD,.. is used
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: n/a
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
I feel that this edge-case is obscure enough that it's not really worth
documenting.
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.
Previous Comments:
------------------------------------------------------------------------
[2011-04-21 11:02:27] johncart at cisco dot com
Description:
------------
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:
http://us.php.net/manual/en/function.exec.php#76687
Test script:
---------------
n/a
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54586&edit=1