Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/usr.sbin/dhcp/server Pull up revision 1.25 (requested b...



details:   https://anonhg.NetBSD.org/src/rev/609f16eef4b3
branches:  netbsd-1-5
changeset: 491270:609f16eef4b3
user:      he <he%NetBSD.org@localhost>
date:      Sat Apr 21 19:43:53 2001 +0000

description:
Pull up revision 1.25 (requested by mellon):
  Fixes the same problem as in PR#12065, although of course the
  symptoms would be different for the relay agent and server.

diffstat:

 usr.sbin/dhcp/server/dhcpd.c |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 10e56296ba0c -r 609f16eef4b3 usr.sbin/dhcp/server/dhcpd.c
--- a/usr.sbin/dhcp/server/dhcpd.c      Sat Apr 21 19:43:32 2001 +0000
+++ b/usr.sbin/dhcp/server/dhcpd.c      Sat Apr 21 19:43:53 2001 +0000
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhcpd.c,v 1.17.2.4 2001/04/04 20:56:49 he Exp $ Copyright 1995-2001 Internet Software Consortium.";
+"$Id: dhcpd.c,v 1.17.2.5 2001/04/21 19:43:53 he Exp $ Copyright 1995-2001 Internet Software Consortium.";
 #endif
 
   static char copyright[] =
@@ -215,6 +215,16 @@
        char *traceoutfile = (char *)0;
 #endif
 
+       /* Make sure we have stdin, stdout and stderr. */
+       status = open ("/dev/null", O_RDWR);
+       if (status == 0)
+               status = open ("/dev/null", O_RDWR);
+       if (status == 1) {
+               status = open ("/dev/null", O_RDWR);
+               log_perror = 0; /* No sense logging to /dev/null. */
+       } else if (status != -1)
+               close (status);
+
        /* Set up the client classification system. */
        classification_setup ();
 



Home | Main Index | Thread Index | Old Index