]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
move setsid() call to ipc.c
authorwessels <>
Tue, 10 Feb 1998 07:58:42 +0000 (07:58 +0000)
committerwessels <>
Tue, 10 Feb 1998 07:58:42 +0000 (07:58 +0000)
src/dnsserver.cc
src/ipc.cc
src/pinger.cc
src/unlinkd.cc

index 59ad5b3db51c14f2b7f889e53681ebfdcce713de..5305460ad60061bb1823bc43d5d9ddee3cd39bfc 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dnsserver.cc,v 1.43 1998/02/10 00:42:54 wessels Exp $
+ * $Id: dnsserver.cc,v 1.44 1998/02/10 00:58:44 wessels Exp $
  *
  * DEBUG: section 0     DNS Resolver
  * AUTHOR: Harvest Derived
@@ -265,9 +265,6 @@ main(int argc, char *argv[])
     int i;
     int c;
 
-#if HAVE_SETSID
-    setsid();
-#endif
     safe_inet_addr("255.255.255.255", &no_addr);
 
 #if HAVE_RES_INIT
index 171065017c64bf5c9ab597a6281930b478211c8b..c79d912806a5b2ee770aac9614dbfd445babaa99 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipc.cc,v 1.2 1998/02/02 21:16:26 wessels Exp $
+ * $Id: ipc.cc,v 1.3 1998/02/10 00:58:42 wessels Exp $
  *
  * DEBUG: section 54    Interprocess Communication
  * AUTHOR: Duane Wessels
@@ -244,6 +244,9 @@ ipcCreate(int type, const char *prog, char *const args[], const char *name, int
     if (cwfd != crfd)
        if (cwfd > 2)
            close(cwfd);
+#if HAVE_SETSID
+    setsid();
+#endif
     execvp(prog, args);
     debug(50, 0) ("ipcCreate: %s: %s\n", prog, xstrerror());
     _exit(1);
index aebc761aeb07c673e60c37adb52125c131aba0f1..783b1de2584278b985a48384a4714c1f70b1f2dc 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: pinger.cc,v 1.31 1998/02/10 00:42:55 wessels Exp $
+ * $Id: pinger.cc,v 1.32 1998/02/10 00:58:43 wessels Exp $
  *
  * DEBUG: section 42    ICMP Pinger program
  * AUTHOR: Duane Wessels
@@ -319,9 +319,6 @@ main(int argc, char *argv[])
     char *t;
     time_t last_check_time = 0;
 
-#if HAVE_SETSID
-    setsid();
-#endif
     if ((t = getenv("SQUID_DEBUG")))
        debug_args = xstrdup(t);
     getCurrentTime();
index 936688e94fc9ec8961c2b9fa14e5bf2c8d326fa7..0c09476cbd1b773d665cecd08bec1adf1997eb9a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: unlinkd.cc,v 1.18 1998/02/10 00:42:54 wessels Exp $
+ * $Id: unlinkd.cc,v 1.19 1998/02/10 00:58:44 wessels Exp $
  *
  * DEBUG: section 43    Unlink Daemon
  * AUTHOR: Duane Wessels
@@ -59,7 +59,6 @@ main(int argc, char *argv[])
 {
     char buf[UNLINK_BUF_LEN];
     char *t;
-    setsid();
     setbuf(stdin, NULL);
     while (fgets(buf, UNLINK_BUF_LEN, stdin)) {
        if ((t = strchr(buf, '\n')))