Fix the case where one goes from zero to more than zero items enabled

in /etc/ttys.  Before this fix, once the count of active services
reaches 0, one could never restart any more without a reboot.

Steve Passe did the leg work on this patch.  After he found the fix,
we discovered that an identical fix had been made to NetBSD.

Approved by: re@ <scottl>
Approval tool: peril sensitive sunglasses
This commit is contained in:
Warner Losh 2003-12-05 04:28:03 +00:00
parent bc38932a58
commit 35fc132143

View File

@ -1279,9 +1279,6 @@ clean_ttys(void)
int devlen;
char *old_getty, *old_window, *old_type;
if (! sessions)
return (state_func_t) multi_user;
/*
* mark all sessions for death, (!SE_PRESENT)
* as we find or create new ones they'll be marked as keepers,