]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Close std{in,out,err} when daemonizing
authorTed Lemon <source@isc.org>
Thu, 12 Sep 1996 09:28:13 +0000 (09:28 +0000)
committerTed Lemon <source@isc.org>
Thu, 12 Sep 1996 09:28:13 +0000 (09:28 +0000)
dhcpd.c
server/dhcpd.c

diff --git a/dhcpd.c b/dhcpd.c
index 7aa6c45642432969c471869a2d99534b40732abe..b46b74bb5dbd0371ae4a06d77cf0092ab762ba9e 100644 (file)
--- a/dhcpd.c
+++ b/dhcpd.c
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhcpd.c,v 1.35 1996/09/11 18:53:32 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
+"$Id: dhcpd.c,v 1.36 1996/09/12 09:28:13 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
 #endif
 
 static char copyright[] =
@@ -171,6 +171,9 @@ int main (argc, argv, envp)
                else if (pid)
                        exit (0);
                /* Become session leader and get pid... */
+               close (0);
+               close (1);
+               close (2);
                pid = setsid ();
        }
 
index 7aa6c45642432969c471869a2d99534b40732abe..b46b74bb5dbd0371ae4a06d77cf0092ab762ba9e 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhcpd.c,v 1.35 1996/09/11 18:53:32 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
+"$Id: dhcpd.c,v 1.36 1996/09/12 09:28:13 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
 #endif
 
 static char copyright[] =
@@ -171,6 +171,9 @@ int main (argc, argv, envp)
                else if (pid)
                        exit (0);
                /* Become session leader and get pid... */
+               close (0);
+               close (1);
+               close (2);
                pid = setsid ();
        }