note 18945 added to function.register-shutdown-function

From: Date: Sun, 10 Feb 2002 22:29:42 +0000
Subject: note 18945 added to function.register-shutdown-function
Groups: php.notes 
Request: Send a blank email to php-notes+get-26458@lists.php.net to get a copy of this message
An important note for everyone wondering why their registered shutdown functions aren't working in non-CGI scripts. It's because there is NO signal handling support in PHP. HUP, TERM, ABRT, even PWR; none of them will trigger a shutdown function. I just spent hours trying to figure out why all my shutdown functions were being completely ignored. The ONLY time they get called is if "die" or "exit" are called, or when script execution reaches its natural completion; and if that happens, why BOTHER having a shutdown function?? Just call it yourself! So in short, this functionality is only useful in CGI scripts until the PHP developers add signal handling support to non-CGI scripting. And, editors, don't dare call this a "feature request"... this is a WARNING to everyone trying to use this function. Signal handling should have been in PHP since version 1.0... -- http://www.php.net/manual/en/function.register-shutdown-function.php http://master.php.net/manage/user-notes.php?action=edit+18945 http://master.php.net/manage/user-notes.php?action=delete+18945 http://master.php.net/manage/user-notes.php?action=reject+18945

« previous php.notes (#26458) next »