mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 05:58:57 +00:00
Don't bother fork()ing after closing a ctty if ppp is about to
terminate anyway.
This commit is contained in:
parent
1bbd8362c7
commit
e62ce959d0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55066
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user