ID:               49340
 User updated by:  alexmontoanelli at gmail dot com
 Reported By:      alexmontoanelli at gmail dot com
 Status:           Open
 Bug Type:         PCNTL related
 Operating System: Linux
 PHP Version:      5.2.10
 New Comment:

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

Some one else can give the final word ?

Regards


Previous Comments:
------------------------------------------------------------------------

[2009-08-27 19:30:38] sjo...@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

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

[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

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

[2009-08-24 08:54:42] sjo...@php.net

Thank you for your bug report.

I don't fully understand the problem.

Is the problem that you have to hit enter for the signal handler to
run? Or that the line with 'echo $foo' is ran after the fgets?

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

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
    http://bugs.php.net/49340

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

Reply via email to