Page MenuHomeFreeBSD

D20509.diff
No OneTemporary

D20509.diff

Index: head/usr.sbin/daemon/daemon.c
===================================================================
--- head/usr.sbin/daemon/daemon.c
+++ head/usr.sbin/daemon/daemon.c
@@ -359,12 +359,13 @@
}
}
}
+ if (restart && !terminate)
+ daemon_sleep(restart, 0);
if (sigprocmask(SIG_BLOCK, &mask_term, NULL)) {
warn("sigprocmask");
goto exit;
}
if (restart && !terminate) {
- daemon_sleep(restart, 0);
close(pfd[0]);
pfd[0] = -1;
goto restart;
@@ -384,7 +385,8 @@
daemon_sleep(time_t secs, long nsecs)
{
struct timespec ts = { secs, nsecs };
- while (nanosleep(&ts, &ts) == -1) {
+
+ while (!terminate && nanosleep(&ts, &ts) == -1) {
if (errno != EINTR)
err(1, "nanosleep");
}

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 3, 8:51 AM (2 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40120644
Default Alt Text
D20509.diff (717 B)

Event Timeline