Edit report at http://bugs.php.net/bug.php?id=52121&edit=1
ID: 52121 Updated by: [email protected] Reported by: nick dot telford at gmail dot com Summary: pcntl_signal() restart_syscalls doesn't behave as expected -Status: Open +Status: Assigned Type: Bug Package: PCNTL related Operating System: Ubuntu 10.04 PHP Version: 5.3.2 -Assigned To: +Assigned To: lbarnaud Previous Comments: ------------------------------------------------------------------------ [2010-06-18 18:01:22] nick dot telford at gmail dot com Description: ------------ The 3rd parameter of pcntl_signal() is "restart_syscalls". The docs provide very little information about it, however reading here http://www.win.tue.nl/~aeb/linux/lk/lk-4.html#ss4.5 shows that it should cause the following behaviour when a wait() call is made: "The effect is that upon an interrupt the system call is aborted, the user program's signal handler is called, and afterwards the system call is restarted from the beginning." The pcntl implementation of the restart_syscalls parameter appears to restart the syscalls *without* calling the userland signal handler. While I understand that this cannot be fixed (due to the "tick" based signal handling in PHP), the "restart_syscalls" parameter should not default to "true". If the default parameter value is not changed, at the very least a big red note should be made in the documentation warning of this inconsistency. Expected result: ---------------- restart_syscalls parameter, when true, should cause wait() calls to get restarted after calling the userland signal handler. Actual result: -------------- restart_syscalls parameter, when true, causes wait() calls to get restarted *without* calling the userland signal handler. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52121&edit=1
