Don't bother fork()ing after closing a ctty if ppp is about to

terminate anyway.
This commit is contained in:
Brian Somers 1999-12-23 21:43:25 +00:00
parent 1bbd8362c7
commit e62ce959d0

View File

@ -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));