diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-06-27 16:29:21 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-06-27 16:29:21 +0000 |
commit | e50d0c40722f1c83fa51f20dd6d5b195b18d97d0 (patch) | |
tree | 56d199fcc005eaf6698ab22f45f2d5d8a34ed47a | |
parent | 0a1885deb0e22e739fffc97c2821193c716a8342 (diff) | |
download | tinyproxy-e50d0c40722f1c83fa51f20dd6d5b195b18d97d0.tar.gz tinyproxy-e50d0c40722f1c83fa51f20dd6d5b195b18d97d0.zip |
(child_make): Reset the various signals to the default signal handler so that the children can be properly destroyed.
Diffstat (limited to '')
-rw-r--r-- | src/child.c | 10 |
1 files changed, 9 insertions, 1 deletions
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; } |