2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-29 21:38:10 +00:00

Fix logging to stderr

This commit is contained in:
Ted Lemon 1996-08-29 20:15:32 +00:00
parent ef6f87b4d6
commit f5d07a3896
2 changed files with 16 additions and 6 deletions

View File

@ -41,7 +41,7 @@
*/ */
static char objcopyright[] = static char objcopyright[] =
"$Id: dhcpd.c,v 1.29 1996/08/29 09:55:52 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium."; "$Id: dhcpd.c,v 1.30 1996/08/29 20:15:32 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
static char copyright[] = static char copyright[] =
"Copyright 1995, 1996 The Internet Software Consortium."; "Copyright 1995, 1996 The Internet Software Consortium.";
static char arr [] = "All rights reserved."; static char arr [] = "All rights reserved.";
@ -118,7 +118,7 @@ int main (argc, argv, envp)
} else if (!strcmp (argv [i], "-d")) { } else if (!strcmp (argv [i], "-d")) {
#ifndef DEBUG #ifndef DEBUG
daemon = 0; daemon = 0;
log_perror = 1; log_perror = -1;
#endif #endif
} else if (argv [i][0] == '-') { } else if (argv [i][0] == '-') {
usage (); usage ();
@ -137,6 +137,11 @@ int main (argc, argv, envp)
} }
} }
/* If we were requested to log to stdout on the command line,
keep doing so; otherwise, stop. */
if (log_perror == -1)
log_perror = 1;
else
log_perror = 0; log_perror = 0;
#ifndef DEBUG #ifndef DEBUG

View File

@ -41,7 +41,7 @@
*/ */
static char objcopyright[] = static char objcopyright[] =
"$Id: dhcpd.c,v 1.29 1996/08/29 09:55:52 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium."; "$Id: dhcpd.c,v 1.30 1996/08/29 20:15:32 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
static char copyright[] = static char copyright[] =
"Copyright 1995, 1996 The Internet Software Consortium."; "Copyright 1995, 1996 The Internet Software Consortium.";
static char arr [] = "All rights reserved."; static char arr [] = "All rights reserved.";
@ -118,7 +118,7 @@ int main (argc, argv, envp)
} else if (!strcmp (argv [i], "-d")) { } else if (!strcmp (argv [i], "-d")) {
#ifndef DEBUG #ifndef DEBUG
daemon = 0; daemon = 0;
log_perror = 1; log_perror = -1;
#endif #endif
} else if (argv [i][0] == '-') { } else if (argv [i][0] == '-') {
usage (); usage ();
@ -137,6 +137,11 @@ int main (argc, argv, envp)
} }
} }
/* If we were requested to log to stdout on the command line,
keep doing so; otherwise, stop. */
if (log_perror == -1)
log_perror = 1;
else
log_perror = 0; log_perror = 0;
#ifndef DEBUG #ifndef DEBUG