From: alexmontoanelli at gmail dot com Operating system: Linux PHP version: 5.2.10 PHP Bug Type: PCNTL related Bug description: Signals not catcable when certain functions are in execution
Description:
------------
After executions of certain functions,
the handler configured by
posix_singal, are not called where the
funcion are in execution - like freads.
Reproduce code:
---------------
#!/usr/bin/php
<?php
declare(ticks = 1);
function handler($a){
echo "Calling handler on signal : $a\n";
}
//define handlers for signals
pcntl_signal(SIGTERM, 'handler');
pcntl_signal(SIGINT, 'handler');
//if you send a signal, the function fgets are waiting for a user input,
he is not called, until you enter something
$foo = fgets(STDIN);
echo $foo;
Expected result:
----------------
alexmm tmp # php a.php
^C
Calling handler on signal : 2
Actual result:
--------------
alexmm tmp # php a.php
^C MY_INPUT_AFTER_SEND_CTRL_C
Calling handler on signal : 2
MY_INPUT_AFTER_SEND_CTRL_C
--
Edit bug report at http://bugs.php.net/?id=49340&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49340&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49340&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49340&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49340&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=49340&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49340&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=49340&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=49340&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=49340&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=49340&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=49340&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=49340&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=49340&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49340&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49340&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49340&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=49340&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=49340&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=49340&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=49340&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=49340&r=mysqlcfg
