note 99329 modified in function.apache-child-terminate by danbrown
| From: | danbrown@php.net | Date: | Wed, 11 Aug 2010 13:48:53 +0000 |
| Subject: | note 99329 modified in function.apache-child-terminate by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-171568@lists.php.net to get a copy of this message | ||
I found out a solution for Apache 2. However this works only without threads and only on POSIX
compatible OS systems (e.g. Linux, OpenSolaris...).
<?php
// Terminate Apache 2 child process after request has been
// done by sending a SIGWINCH POSIX signal (28).
function kill_on_exit() {
posix_kill( getmypid(), 28 );
}
register_shutdown_function( 'kill_on_exit' );
?>
--was--
I found out a solution for Apache 2. However this works only without threads and only on POSIX
compatible OS systems (e.g. Linux, OpenSolaris...).
<?
// Terminate Apache 2 child process after request has been
// done by sending a SIGWINCH POSIX signal (28).
function kill_on_exit() {
posix_kill( getmypid(), 28 );
}
register_shutdown_function( 'kill_on_exit' );
?>
http://php.net/manual/en/function.apache-child-terminate.php