diff options
author | brian <brian@FreeBSD.org> | 1998-05-28 23:17:51 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1998-05-28 23:17:51 +0000 |
commit | e0d8cc391d650e6b69d5d77af50a002041522151 (patch) | |
tree | e3cc3229d89e0fd28c03dea90790a87b1f1bcfe6 /usr.sbin/ppp/log.c | |
parent | f320a1dcb71e3195a3a9ab924dd4f60db4c3ac53 (diff) | |
download | FreeBSD-src-e0d8cc391d650e6b69d5d77af50a002041522151.zip FreeBSD-src-e0d8cc391d650e6b69d5d77af50a002041522151.tar.gz |
o #define the name "tun" in defs.h against the future possibility
of supporting architectures with different device names.
o Close /dev/tunX when destroying the bundle.
o Don't forget to close the parent end of the pipe in the child
process when exec'ing a program from a chat script.
o If we close our controlling terminal, ditch the current session
with it, allowing getty(8) (or whatever) to regain control.
o After transferring our controlling terminal descriptor to another
ppp instance, we now fork a new ppp to continue where we left off,
transferring ownership of all uucp locks and the /var/run/tunX.pid
file. Meanwhile the parent closes all file descriptors, defaults
all signals and does a pause() to wait for a HUP after the
transferred descriptor is finally closed.
We don't run /bin/cat any more (again!).
Suggested by: bde
TODO: It seems clocal devices need their pause()d session leader
to be given a manual HUP, as closing the last open descriptor
doesn't do the job.
Diffstat (limited to 'usr.sbin/ppp/log.c')
-rw-r--r-- | usr.sbin/ppp/log.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ppp/log.c b/usr.sbin/ppp/log.c index 61a3b29..c530dae 100644 --- a/usr.sbin/ppp/log.c +++ b/usr.sbin/ppp/log.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: log.c,v 1.27 1998/05/21 21:46:25 brian Exp $ + * $Id: log.c,v 1.28 1998/05/23 22:24:40 brian Exp $ */ #include <sys/types.h> @@ -39,6 +39,7 @@ #include "log.h" #include "descriptor.h" #include "prompt.h" +#include "defs.h" static const char *LogNames[] = { "Async", @@ -293,7 +294,7 @@ log_Printf(int lev, const char *fmt,...) if ((log_IsKept(lev) & LOG_KEPT_LOCAL) && promptlist) { if ((log_IsKept(LogTUN) & LOG_KEPT_LOCAL) && LogTunno != -1) - snprintf(nfmt, sizeof nfmt, "tun%d: %s: %s", + snprintf(nfmt, sizeof nfmt, "%s%d: %s: %s", TUN_NAME, LogTunno, log_Name(lev), fmt); else snprintf(nfmt, sizeof nfmt, "%s: %s", log_Name(lev), fmt); @@ -306,7 +307,7 @@ log_Printf(int lev, const char *fmt,...) if ((log_IsKept(lev) & LOG_KEPT_SYSLOG) && (lev != LogWARN || !promptlist)) { if ((log_IsKept(LogTUN) & LOG_KEPT_SYSLOG) && LogTunno != -1) - snprintf(nfmt, sizeof nfmt, "tun%d: %s: %s", + snprintf(nfmt, sizeof nfmt, "%s%d: %s: %s", TUN_NAME, LogTunno, log_Name(lev), fmt); else snprintf(nfmt, sizeof nfmt, "%s: %s", log_Name(lev), fmt); |