Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/rtadvd If we could not lock the pid file, don't con...



details:   https://anonhg.NetBSD.org/src/rev/dd22178b5fe2
branches:  trunk
changeset: 932746:dd22178b5fe2
user:      christos <christos%NetBSD.org@localhost>
date:      Thu May 14 23:42:18 2020 +0000

description:
If we could not lock the pid file, don't continue as we end up with multiple
rtadvd's (thanks roy@)

diffstat:

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

diffs (23 lines):

diff -r b2268a800436 -r dd22178b5fe2 usr.sbin/rtadvd/rtadvd.c
--- a/usr.sbin/rtadvd/rtadvd.c  Thu May 14 23:09:29 2020 +0000
+++ b/usr.sbin/rtadvd/rtadvd.c  Thu May 14 23:42:18 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtadvd.c,v 1.77 2020/05/10 22:38:51 christos Exp $     */
+/*     $NetBSD: rtadvd.c,v 1.78 2020/05/14 23:42:18 christos Exp $     */
 /*     $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $    */
 
 /*
@@ -224,12 +224,11 @@
        if ((pid = pidfile_lock(pidfilepath)) != 0) {
                if (pid == -1) {
                        logit(LOG_ERR, "pidfile_lock: %m");
-                       /* Continue */
                } else {
                        logit(LOG_ERR, "Another instance of `%s' is running "
                            "(pid %d); exiting.", getprogname(), pid);
-                       return EXIT_FAILURE;
                }
+               return EXIT_FAILURE;
        }
 
        if (prog_init && prog_init() == -1)



Home | Main Index | Thread Index | Old Index