Edit report at https://bugs.php.net/bug.php?id=49340&edit=1
ID: 49340
Comment by: nasretdinov 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:
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
Previous Comments:
------------------------------------------------------------------------
[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] [email protected]
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
------------------------------------------------------------------------
[2009-08-24 11:41:59] alexmontoanelli at gmail dot com
The problem is that I need hit enter - exit from fgets - to run the signal
handler - but this is not the correct way - in python for example, the signal
handler are calling when the function are waiting for a user input.
I found this page - http://br2.php.net/manual/en/function.pcntl-signal.php -
the commentary above:
'28-Mar-2006 07:26
Process handling is not available when using a blocking socket! Bear this in
mind.'
There is 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