Doc #63275 [Opn->Csd]: Enhance register_shutdown_function docs about SIGTERM handling

From: Date: Mon, 12 Nov 2012 22:41:30 +0000
Subject: Doc #63275 [Opn->Csd]: Enhance register_shutdown_function docs about SIGTERM handling
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9104@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 Updated by: salathe@php.net Reported by: eric at wepay dot com Summary: Enhance register_shutdown_function docs about SIGTERM handling -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: salathe Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Committed requinix's patch. Previous Comments: ------------------------------------------------------------------------ [2012-11-12 22:34:24] salathe@php.net Automatic comment from SVN on behalf of salathe Revision: http://svn.php.net/viewvc/?view=revision&revision=328335 Log: 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) ------------------------------------------------------------------------ [2012-10-31 20:19:12] mail+php at requinix dot net 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 ------------------------------------------------------------------------ [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 (#9104) next »