From 3c0c031beb1b4f715e2b4bb79c7fd835d1aacc32 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Thu, 13 Apr 2000 12:05:16 +0000 Subject: [PATCH] don't stop logging on detach if we use logfd or logfile option --- pppd/options.c | 6 ++++-- pppd/pppd.h | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pppd/options.c b/pppd/options.c index 07dd6d0..5f22c17 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -17,7 +17,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define RCSID "$Id: options.c,v 1.72 2000/04/04 07:06:52 paulus Exp $" +#define RCSID "$Id: options.c,v 1.73 2000/04/13 12:05:16 paulus Exp $" #include #include @@ -128,6 +128,7 @@ char *current_option; /* the name of the option being parsed */ int privileged_option; /* set iff the current option came from root */ char *option_source; /* string saying where the option came from */ bool log_to_file; /* log_to_fd is a file opened by us */ +bool log_to_specific_fd; /* log_to_fd was specified by user option */ /* * Prototypes @@ -257,7 +258,8 @@ option_t general_options[] = { { "sync", o_bool, &sync_serial, "Use synchronous HDLC serial encoding", 1 }, { "logfd", o_int, &log_to_fd, - "Send log messages to this file descriptor" }, + "Send log messages to this file descriptor", + 0, &log_to_specific_fd }, { "logfile", o_special, setlogfile, "Append log messages to this file" }, { "nolog", o_int, &log_to_fd, diff --git a/pppd/pppd.h b/pppd/pppd.h index 465a63e..a19659c 100644 --- a/pppd/pppd.h +++ b/pppd/pppd.h @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: pppd.h,v 1.52 2000/04/04 07:06:53 paulus Exp $ + * $Id: pppd.h,v 1.53 2000/04/13 12:05:15 paulus Exp $ */ /* @@ -178,6 +178,8 @@ extern int link_stats_valid; /* set if link_stats is valid */ extern int link_connect_time; /* time the link was up for */ extern int using_pty; /* using pty as device (notty or pty opt.) */ extern int log_to_fd; /* logging to this fd as well as syslog */ +extern bool log_to_file; /* log_to_fd is a file */ +extern bool log_to_specific_fd; /* log_to_fd was specified by user */ extern char *no_ppp_msg; /* message to print if ppp not in kernel */ extern volatile int status; /* exit status for pppd */ extern int devnam_fixed; /* can no longer change devnam */ -- 2.39.2