From e50d0c40722f1c83fa51f20dd6d5b195b18d97d0 Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Thu, 27 Jun 2002 16:29:21 +0000 Subject: (child_make): Reset the various signals to the default signal handler so that the children can be properly destroyed. --- src/child.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/child.c b/src/child.c index 9aaee36..67b9777 100644 --- a/src/child.c +++ b/src/child.c @@ -1,4 +1,4 @@ -/* $Id: child.c,v 1.4 2002-06-15 17:31:31 rjkaes Exp $ +/* $Id: child.c,v 1.5 2002-06-27 16:29:21 rjkaes Exp $ * * Handles the creation/destruction of the various children required for * processing incoming connections. @@ -19,6 +19,7 @@ #include "tinyproxy.h" #include "child.h" +#include "daemon.h" #include "filter.h" #include "heap.h" #include "log.h" @@ -243,6 +244,13 @@ child_make(struct child_s* ptr) if ((pid = fork()) > 0) return pid; /* parent */ + /* + * Reset the SIGNALS so that the child can be reaped. + */ + set_signal_handler(SIGCHLD, SIG_DFL); + set_signal_handler(SIGTERM, SIG_DFL); + set_signal_handler(SIGHUP, SIG_DFL); + child_main(ptr); /* never returns */ return -1; } -- cgit v1.2.3