Doc #63275 [Com]: Enhance register_shutdown_function docs about SIGTERM handling

From: Date: Wed, 31 Oct 2012 20:19:12 +0000
Subject: Doc #63275 [Com]: Enhance register_shutdown_function docs about SIGTERM handling
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9037@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63275&edit=1 ID: 63275 Comment by: mail+php at requinix dot net Reported by: eric at wepay dot com Summary: Enhance register_shutdown_function docs about SIGTERM handling Status: Open Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Did you know you can easily submit changes to the online documentation? Look for the [edit] link in the top-right corner of manual pages. Here's a patch with your suggestions: "register_shutdown_function: callbacks not executed if SIGTERMed/SIGKILLed (bug #63275)" http://edit.php.net/?patchID=758&project=PHP Previous Comments: ------------------------------------------------------------------------ [2012-10-13 17:44:49] eric at wepay dot com Description: ------------ There should be a note added to the documentation on register_shutdown_function that the callbacks will not be run if the process is killed via SIGTERM/SIGKILL, however they will run if SIGTERM is intercepted with pcntl_signal and the callback causes the script to exit cleanly; i.e. pcntl_signal(SIGTERM, function() { exit; }); Given the semantics of SIGTERM (request a clean shutdown of the process), it's unintuitive to not get the behavior of using "exit;", although I can see the reasoning for doing so. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63275&edit=1

« previous php.doc.bugs (#9037) next »