Bug #49340 [Com]: Signals not catchable when certain functions are in execution

From: Date: Wed, 13 Jul 2016 00:24:46 +0000
Subject: Bug #49340 [Com]: Signals not catchable when certain functions are in execution
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202256@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=49340&edit=1

 ID:                 49340
 Comment by:         anthonyryan1 at gmail dot com
 Reported by:        alexmontoanelli at gmail dot com
 Summary:            Signals not catchable when certain functions are in
                     execution
 Status:             Open
 Type:               Bug
 Package:            PCNTL related
 Operating System:   Linux
 PHP Version:        5.2.10
 Block user comment: N
 Private report:     N

 New Comment:

Just encountered this in PHP 7.0.6. The fgets blocking operation still prevents signal handlers from
firing.


Previous Comments:
------------------------------------------------------------------------
[2012-01-31 13:53:00] nasretdinov at gmail dot com

Actually it is due to syscall restarting by default. You should pass third 
argument as "false" to pcntl_signal and you will be able to catch SIGINT, but 
only after second attempt. The other bug I created (https://bugs.php.net/bug.php?
id=52121) addresses more severe case, I suppose

------------------------------------------------------------------------
[2009-08-31 13:42:12] alexmontoanelli at gmail dot com

Ok.But I guess that this behavior is not that anyone expect.

Some one else can give the final word ?

Regards

------------------------------------------------------------------------
[2009-08-27 19:30:38] sjoerd@php.net

PHP signals are implemented with ticks
(http://us3.php.net/manual/en/control-structures.declare.php). Ticks are events that occur every so
much statements in a script. Since fgets() blocks, no more statements are executed and no more ticks
are fired. This means that no signal arrives.

I do not know whether the current behavior is by design or by mistake, so I cannot determine whether
it is a bug or not. It would certainly be desirable to be able to interrupt a blocking read by doing
Ctrl-C.

------------------------------------------------------------------------
[2009-08-27 11:28:41] alexmontoanelli at gmail dot com

some position ?

------------------------------------------------------------------------
[2009-08-24 13:04:08] alexmontoanelli at gmail dot com

Where I say:

'There is true?',

is

'That's true?'

Regards

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=49340


--
Edit this bug report at https://bugs.php.net/bug.php?id=49340&edit=1


Thread (11 messages)

« previous php.bugs (#202256) next »