Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/rtadvd - die sooner (if we got interrupted)



details:   https://anonhg.NetBSD.org/src/rev/54ae6bac25ca
branches:  trunk
changeset: 449947:54ae6bac25ca
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Mar 29 21:51:52 2019 +0000

description:
- die sooner (if we got interrupted)
- when we finish resending exit.

diffstat:

 usr.sbin/rtadvd/rtadvd.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 6263dc1b177f -r 54ae6bac25ca usr.sbin/rtadvd/rtadvd.c
--- a/usr.sbin/rtadvd/rtadvd.c  Fri Mar 29 21:44:22 2019 +0000
+++ b/usr.sbin/rtadvd/rtadvd.c  Fri Mar 29 21:51:52 2019 +0000
@@ -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 @@
                    (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 @@
                ra_timer_update(rai, &rai->timer->tm);
                rtadvd_set_timer(&rai->timer->tm, rai->timer);
        }
+       exit(EXIT_SUCCESS);
 }
 
 static void



Home | Main Index | Thread Index | Old Index