]> git.ozlabs.org Git - ppp.git/commitdiff
don't stop logging on detach if we use logfd or logfile option
authorPaul Mackerras <paulus@samba.org>
Thu, 13 Apr 2000 12:05:16 +0000 (12:05 +0000)
committerPaul Mackerras <paulus@samba.org>
Thu, 13 Apr 2000 12:05:16 +0000 (12:05 +0000)
pppd/options.c
pppd/pppd.h

index 07dd6d02d3b0d255d4424b9e8416990dcbe6dd9e..5f22c1759485442c519478b89d79d507f8be7113 100644 (file)
@@ -17,7 +17,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
  * 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 <ctype.h>
 #include <stdio.h>
 
 #include <ctype.h>
 #include <stdio.h>
@@ -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 */
 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
 
 /*
  * 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,
     { "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,
     { "logfile", o_special, setlogfile,
       "Append log messages to this file" },
     { "nolog", o_int, &log_to_fd,
index 465a63ee237c4750dc7dada85d26214bc880fa7b..a19659ce2c9467e22b6ed735dfd0dc02f2a8912f 100644 (file)
@@ -16,7 +16,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
  * 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 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 */
 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 */