Module Name: src
Committed By: christos
Date: Fri Mar 29 21:51:52 UTC 2019
Modified Files:
src/usr.sbin/rtadvd: rtadvd.c
Log Message:
- die sooner (if we got interrupted)
- when we finish resending exit.
To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/usr.sbin/rtadvd/rtadvd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/rtadvd/rtadvd.c
diff -u src/usr.sbin/rtadvd/rtadvd.c:1.68 src/usr.sbin/rtadvd/rtadvd.c:1.69
--- src/usr.sbin/rtadvd/rtadvd.c:1.68 Sat Jan 12 14:09:25 2019
+++ src/usr.sbin/rtadvd/rtadvd.c Fri Mar 29 17:51:52 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rtadvd.c,v 1.68 2019/01/12 19:09:25 christos Exp $ */
+/* $NetBSD: rtadvd.c,v 1.69 2019/03/29 21:51:52 christos Exp $ */
/* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */
/*
@@ -351,8 +351,11 @@ main(int argc, char *argv[])
(timeout->tv_nsec + 999999) / 1000000) : INFTIM)) == -1)
{
/* EINTR would occur upon SIGUSR1 for status dump */
- if (errno == EINTR)
+ if (errno == EINTR) {
+ if (do_die)
+ die();
continue;
+ }
logit(LOG_ERR, "%s: poll: %m", __func__);
if (Dflag)
@@ -445,6 +448,7 @@ die(void)
ra_timer_update(rai, &rai->timer->tm);
rtadvd_set_timer(&rai->timer->tm, rai->timer);
}
+ exit(EXIT_SUCCESS);
}
static void