Changeset View
Changeset View
Standalone View
Standalone View
sbin/shutdown/shutdown.c
Show First 20 Lines • Show All 337 Lines • ▼ Show 20 Lines | timewarn(int timeleft) | ||||
/* | /* | ||||
* play some games, just in case wall doesn't come back | * play some games, just in case wall doesn't come back | ||||
* probably unnecessary, given that wall is careful. | * probably unnecessary, given that wall is careful. | ||||
*/ | */ | ||||
if (!setjmp(alarmbuf)) { | if (!setjmp(alarmbuf)) { | ||||
(void)signal(SIGALRM, timeout); | (void)signal(SIGALRM, timeout); | ||||
(void)alarm((u_int)30); | (void)alarm((u_int)30); | ||||
(void)pclose(pf); | //(void)pclose(pf); | ||||
emaste: ? | |||||
andrei.cos.martin_gmail.comAuthorUnsubmitted Not Done Inline ActionsThe function, for some reason, stalls indefinitely when the guest calls it. andrei.cos.martin_gmail.com: The function, for some reason, stalls indefinitely when the guest calls it.
I am investigating… | |||||
(void)alarm((u_int)0); | (void)alarm((u_int)0); | ||||
(void)signal(SIGALRM, SIG_DFL); | (void)signal(SIGALRM, SIG_DFL); | ||||
} | } | ||||
} | } | ||||
static void | static void | ||||
timeout(int signo __unused) | timeout(int signo __unused) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 237 Lines • Show Last 20 Lines |
?