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

 ID:                 10524
 Updated by:         [email protected]
 Reported by:        development at digitekdesign dot com
 Summary:            register_shutdown_function request
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   Linux 2.2.19
 PHP Version:        4.0 Latest CVS (27/04/2001)
-Assigned To:        
+Assigned To:        jani
 Block user comment: N
 Private report:     N

 New Comment:

Using pcntl it is, works fine with PHP 5.3:



<?php



function shutdown_cb()

{

    echo "shutdown!";

    exit;

}



pcntl_signal(SIGINT, "shutdown_cb");



while(1)

    pcntl_signal_dispatch();



?>


Previous Comments:
------------------------------------------------------------------------
[2001-04-27 09:23:05] development at digitekdesign dot com

It would be helpful if when a script is aborted with CTRL-c while
running on the console that PHP would still call the function named in
register_shutdown_function instead of just completely stopping.



One possible extension could be that the first time CTRL-c is received,
jump to the shutdown function and if a second is received abort
immediately.



I'm not sure if this request is possible, but it certainly would be
helpful.

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



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

Reply via email to