]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #2605: Don't call setsid() on helper childs when running in daemon mode
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Thu, 19 Mar 2009 09:09:03 +0000 (10:09 +0100)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Thu, 19 Mar 2009 09:09:03 +0000 (10:09 +0100)
src/ipc.cc

index a6248a529092d19d8ccf207230b8858830131708..d7f873fa173934d4de7867b5bbcbc2b6fa3776c9 100644 (file)
@@ -381,13 +381,9 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
     for (x = 3; x < SQUID_MAXFD; x++)
         close(x);
 
-    if (opt_no_daemon) {
-        squid_signal(SIGINT, SIG_IGN, SA_RESETHAND);
-        squid_signal(SIGHUP, SIG_IGN, SA_RESETHAND);
-    }
-
 #if HAVE_SETSID
-    setsid();
+    if (opt_no_daemon) {
+       setsid();
 #endif
 
     execvp(prog, (char *const *) args);