From 2156ae971c7f055b319f178f19b48d85c74070ed Mon Sep 17 00:00:00 2001 From: Peter Cowburn Date: Mon, 12 Nov 2012 22:34:43 +0000 Subject: [PATCH] Adding a note that shutdown functions won't be executed if the script gets a SIGTERM or SIGKILL, though you can pcntl_signal() for the TERM and exit;. (doc #63275) -- Provided by anonymous #22227 (mail+php@requinix.net) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328335 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../funchand/functions/register-shutdown-function.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/reference/funchand/functions/register-shutdown-function.xml b/reference/funchand/functions/register-shutdown-function.xml index eadd4f318f..ca011f1e38 100644 --- a/reference/funchand/functions/register-shutdown-function.xml +++ b/reference/funchand/functions/register-shutdown-function.xml @@ -142,6 +142,14 @@ register_shutdown_function('shutdown'); under some web servers, e.g. Apache. + + + Shutdown functions will not be executed if the process is killed with a SIGTERM + or SIGKILL signal. While you cannot intercept a SIGKILL, you can use pcntl_signal + to install a handler for a SIGTERM which uses exit to + end cleanly. + +