#ifndef lint
static char ocopyright[] =
-"$Id: dhcpd.c,v 1.32 1996/09/02 21:16:55 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
+"$Id: dhcpd.c,v 1.33 1996/09/02 21:37:57 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
#endif
static char copyright[] =
int pid;
char pbuf [20];
int daemon = 1;
-#else
- int daemon = 0;
#endif
/* Initially, log errors to stderr as well as to syslogd. */
daemon = 0;
#endif
} else if (!strcmp (argv [i], "-d")) {
+#ifndef DEBUG
daemon = 0;
+#endif
log_perror = -1;
} else if (!strcmp (argv [i], "-cf")) {
if (++i == argc)
else
log_perror = 0;
+#ifndef DEBUG
if (daemon) {
/* Become a daemon... */
if ((pid = fork ()) < 0)
pid = setsid ();
}
-#ifndef DEBUG
/* Read previous pid file. */
if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
status = read (i, pbuf, (sizeof pbuf) - 1);
#ifndef lint
static char ocopyright[] =
-"$Id: dhcpd.c,v 1.32 1996/09/02 21:16:55 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
+"$Id: dhcpd.c,v 1.33 1996/09/02 21:37:57 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
#endif
static char copyright[] =
int pid;
char pbuf [20];
int daemon = 1;
-#else
- int daemon = 0;
#endif
/* Initially, log errors to stderr as well as to syslogd. */
daemon = 0;
#endif
} else if (!strcmp (argv [i], "-d")) {
+#ifndef DEBUG
daemon = 0;
+#endif
log_perror = -1;
} else if (!strcmp (argv [i], "-cf")) {
if (++i == argc)
else
log_perror = 0;
+#ifndef DEBUG
if (daemon) {
/* Become a daemon... */
if ((pid = fork ()) < 0)
pid = setsid ();
}
-#ifndef DEBUG
/* Read previous pid file. */
if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
status = read (i, pbuf, (sizeof pbuf) - 1);