|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-04-27 09:23 UTC] 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 01:00:01 2025 UTC |
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(); ?>