]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Henrik Nordstrom <henrik@henriknordstrom.net>
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 10 Apr 2009 08:17:40 +0000 (20:17 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 10 Apr 2009 08:17:40 +0000 (20:17 +1200)
Bug #2605: Don't call setsid() on helper childs when running in daemon mode

src/ipc.cc

index c844d136ee0e04900b59dfc71205957d603751b2..576aa5e1f288caeed1f98fa007da842498228bff 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);