diff options
author | brian <brian@FreeBSD.org> | 1999-06-02 00:46:55 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-06-02 00:46:55 +0000 |
commit | 3b531265df52d6694a750e5ccc98f84ec147c98f (patch) | |
tree | 274fa060e902f85fbe2c53913fd5ff25930d27aa /usr.sbin/ppp/physical.c | |
parent | 528563d156b054b4067862174976e63c99eab3c2 (diff) | |
download | FreeBSD-src-3b531265df52d6694a750e5ccc98f84ec147c98f.zip FreeBSD-src-3b531265df52d6694a750e5ccc98f84ec147c98f.tar.gz |
Introduce the ``keep-session'' option. Refer to the man
page for details. This allows MP over non-tty devices where
the original ppp process must not exit (such as sshd-spawned
ppp sessions).
Diffstat (limited to 'usr.sbin/ppp/physical.c')
-rw-r--r-- | usr.sbin/ppp/physical.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c index 088b2ea..7c36e4a 100644 --- a/usr.sbin/ppp/physical.c +++ b/usr.sbin/ppp/physical.c @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: physical.c,v 1.14 1999/05/24 16:39:12 brian Exp $ + * $Id: physical.c,v 1.15 1999/06/01 19:08:58 brian Exp $ * */ @@ -595,8 +595,11 @@ physical2iov(struct physical *p, struct iovec *iov, int *niov, int maxiov, p->handler = (struct device *)(long)p->handler->type; } - if (tcgetpgrp(p->fd) == getpgrp()) + if (Enabled(p->dl->bundle, OPT_KEEPSESSION) || + tcgetpgrp(p->fd) == getpgrp()) p->session_owner = getpid(); /* So I'll eventually get HUP'd */ + else + p->session_owner = (pid_t)-1; timer_Stop(&p->link.throughput.Timer); physical_ChangedPid(p, newpid); } @@ -618,7 +621,7 @@ physical2iov(struct physical *p, struct iovec *iov, int *niov, int maxiov, void physical_ChangedPid(struct physical *p, pid_t newpid) { - if (p->fd >= 0 && p->type != PHYS_DIRECT) { + if (p->fd >= 0 && *p->name.full == '/' && p->type != PHYS_DIRECT) { int res; if ((res = ID0uu_lock_txfr(p->name.base, newpid)) != UU_LOCK_OK) |