+----------------------------------------------------------------------+
| APC |
+----------------------------------------------------------------------+
- | Copyright (c) 2006 The PHP Group |
+ | Copyright (c) 2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
All other licensing and usage conditions are those of the PHP Group.
*/
- /* $Id: apc_signal.c,v 1.2 2007/12/26 22:38:43 rasmus Exp $ */
+ /* $Id: apc_signal.c,v 1.2.2.3 2008/05/11 18:57:00 rasmus Exp $ */
/* Allows apc to install signal handlers and maintain signalling
to already registered handlers. Registers all signals that
static int apc_register_signal(int signo, void (*handler)(int, siginfo_t*, void*))
{
#if HAVE_SIGACTION
- struct sigaction sa = {0};
+ struct sigaction sa = {{0}};
apc_signal_entry_t p_sig = {0};
if (sigaction(signo, NULL, &sa) == 0) {
}
} /* }}} */
+/* {{{ apc_set_signals
+ * cleanup signals for shutdown */
+void apc_shutdown_signals()
+{
+ int i=0;
+ if (apc_signal_info.installed > 0) {
+ for (i=0; (i < apc_signal_info.installed); i++) {
+ apc_efree(apc_signal_info.prev[i]);
+ }
+ apc_efree(apc_signal_info.prev);
+ apc_signal_info.installed = 0; /* just in case */
+ }
+}
+
/*
* Local variables:
* tab-width: 4