| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2009-08-24 08:54 UTC] sjoerd@php.net
  [2009-08-24 11:41 UTC] alexmontoanelli at gmail dot com
  [2009-08-24 13:04 UTC] alexmontoanelli at gmail dot com
  [2009-08-27 11:28 UTC] alexmontoanelli at gmail dot com
  [2009-08-27 19:30 UTC] sjoerd@php.net
  [2009-08-31 13:42 UTC] alexmontoanelli at gmail dot com
  [2012-01-31 13:53 UTC] nasretdinov at gmail dot com
  [2016-07-13 00:24 UTC] anthonyryan1 at gmail dot com
  [2017-01-01 21:53 UTC] dave at mudsite dot com
  [2018-06-12 12:20 UTC] dnt at gmx dot gom
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 13:00:02 2025 UTC | 
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