diff options
author | brian <brian@FreeBSD.org> | 1999-12-23 21:43:25 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-12-23 21:43:25 +0000 |
commit | 0c62acb3077cbcd5745aab45550153ca2f1f6a53 (patch) | |
tree | fd5698ee79faa566d5d61331f88ba6f529c0ad79 /usr.sbin | |
parent | da8bf273f760b810a98efec744421da718cc4aa7 (diff) | |
download | FreeBSD-src-0c62acb3077cbcd5745aab45550153ca2f1f6a53.zip FreeBSD-src-0c62acb3077cbcd5745aab45550153ca2f1f6a53.tar.gz |
Don't bother fork()ing after closing a ctty if ppp is about to
terminate anyway.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/bundle.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c index c61f388..d55172d 100644 --- a/usr.sbin/ppp/bundle.c +++ b/usr.sbin/ppp/bundle.c @@ -1697,6 +1697,16 @@ bundle_setsid(struct bundle *bundle, int holdsession) char done; struct datalink *dl; + if (!holdsession && bundle_IsDead(bundle)) { + /* + * No need to lose our session after all... we're going away anyway + * + * We should really stop the timer and pause if holdsession is set and + * the bundle's dead, but that leaves other resources lying about :-( + */ + return; + } + orig = getpid(); if (pipe(fds) == -1) { log_Printf(LogERROR, "pipe: %s\n", strerror(errno)); |