Re: exit function
| From: | Teodor Cimpoesu | Date: | Fri, 20 Oct 2000 08:13:35 +0000 |
| Subject: | Re: exit function | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21348@lists.php.net to get a copy of this message | ||
Hi Rasmus!
On Thu, 19 Oct 2000, Rasmus Lerdorf wrote:
> Ah right, missed the CGI angle of your question. It is only for the
> module version. So no, there is no way to do it with PHP.
maybe a posix_{sigaction|signal}() function to accept PHP functions
as signal handlers?
^C is SIGTERM iirc, so one would `emulate' register_shutdown_function()
with something like:
function sigterm_hook ($int) { echo 'clean-up';}
posix_signal(SIGTERM, "sigterm_hook");
-- teodor