Bug #52121 [Asn->Opn]: pcntl_signal() restart_syscalls doesn't behave as expected

From: Date: Tue, 24 Oct 2017 06:47:41 +0000
Subject: Bug #52121 [Asn->Opn]: pcntl_signal() restart_syscalls doesn't behave as expected
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212024@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=52121&edit=1

 ID:                 52121
 Updated by:         kalle@php.net
 Reported by:        nick dot telford at gmail dot com
 Summary:            pcntl_signal() restart_syscalls doesn't behave as
                     expected
-Status:             Assigned
+Status:             Open
 Type:               Bug
 Package:            PCNTL related
 Operating System:   Ubuntu 10.04
 PHP Version:        5.3.2
-Assigned To:        lbarnaud
+Assigned To:        
 Block user comment: N
 Private report:     N



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 https://bugs.php.net/bug.php?id=52121&edit=1


Thread (3 messages)

« previous php.bugs (#212024) next »