commit - 0db9a31e50598db6c01d67ea72e2970256e0558b
commit + 4cc4c29e380b24a0f53d99f702d6678f71a31ff3
blob - 5f3cadeb5f7eef30ba99d249f62fe00d2f789abd
blob + 75c1aaf1a0ba6dbfbb2f7abdfd8c91e01c76c8cf
--- src/ngircd/proc.c
+++ src/ngircd/proc.c
#include <errno.h>
#include <signal.h>
#include <string.h>
+#include <stdlib.h>
#include <unistd.h>
#include "log.h"
Proc_InitStruct(proc);
}
+/**
+ * Generic signal handler for forked child processes.
+ */
+GLOBAL void
+Proc_GenericSignalHandler(int Signal)
+{
+ switch(Signal) {
+ case SIGTERM:
+#ifdef DEBUG
+ Log_Subprocess(LOG_DEBUG, "Child got TERM signal, exiting.");
+#endif
+ exit(1);
+ }
+}
+
/* -eof- */
blob - c342e1dfa568ab17c16eeb236d53a8e83ea15694
blob + a7bff4f39b79cd5b31e270d524d1f27a89190c5a
--- src/ngircd/proc.h
+++ src/ngircd/proc.h
GLOBAL void Proc_Kill PARAMS((PROC_STAT *proc));
+GLOBAL void Proc_GenericSignalHandler PARAMS((int Signal));
+
#endif
/* -eof- */
blob - e5ac9ec805dc6110c3b75ba9c451d7ae94bdfc94
blob + f8c39cf7160962c96e523f66143dee96d1931add
--- src/ngircd/resolve.c
+++ src/ngircd/resolve.c
}
return false;
} /* Resolve_Name */
-
-
-/**
- * Signal handler for the forked resolver subprocess.
- */
-static void
-Signal_Handler(int Signal)
-{
- switch(Signal) {
- case SIGTERM:
-#ifdef DEBUG
- Log_Subprocess(LOG_DEBUG, "Resolver: Got TERM signal, exiting.");
-#endif
- exit(1);
- }
-}
/**
static void
Init_Subprocess(void)
{
- signal(SIGTERM, Signal_Handler);
+ signal(SIGTERM, Proc_GenericSignalHandler);
Log_Init_Subprocess("Resolver");
}