Richard Quadling wrote: > 2009/12/23 Rasmus Lerdorf <ras...@lerdorf.com>: >> Can anyone think of a situation where you actually want our current >> ignore_user_abort=false setting for the cli sapi? > > I would say that the default setting is pretty important as pressing > CTRL+C (at least on windows) is the quickest way of killing a PHP cli > based script without killing the shell/console or loading the task > manager (or similar), finding the right instance of PHP and then > killing it.
Again, ignore_user_abort has no effect on signal handling. A SIGTERM is going to kill the process regardless of the ignore_user_abort setting. ignore_user_abort is a simple boolean that guides whether to abort when PHP is unable to write to whatever output mechanism the sapi uses. For cli that would be stdout. If for some reason your cli script's tty goes away without the script being terminated then your script will die the next time it tries to write anything because ignore_user_abort is off by default. One situation where this is likely is when you specifically background and nohup your cli script. Right now unless you also set ignore_user_abort to true in your script, it will die on any sort of output. There are other cases as well. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php