Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/mountd PR/50125 - Jarle Greipsland -- Incorrect PID...



details:   https://anonhg.NetBSD.org/src/rev/107107878577
branches:  trunk
changeset: 809865:107107878577
user:      jnemeth <jnemeth%NetBSD.org@localhost>
date:      Wed Aug 05 23:23:47 2015 +0000

description:
PR/50125 - Jarle Greipsland -- Incorrect PID in /var/run/mountd.pid

Move call to pidfile() after daemon() so that correct (child) pid is
written to pidfile.

diffstat:

 usr.sbin/mountd/mountd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 4fa36d3984d9 -r 107107878577 usr.sbin/mountd/mountd.c
--- a/usr.sbin/mountd/mountd.c  Wed Aug 05 23:17:06 2015 +0000
+++ b/usr.sbin/mountd/mountd.c  Wed Aug 05 23:23:47 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mountd.c,v 1.126 2014/04/04 12:45:59 gson Exp $         */
+/*     $NetBSD: mountd.c,v 1.127 2015/08/05 23:23:47 jnemeth Exp $      */
 
 /*
  * Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char     sccsid[] = "@(#)mountd.c  8.15 (Berkeley) 5/1/95";
 #else
-__RCSID("$NetBSD: mountd.c,v 1.126 2014/04/04 12:45:59 gson Exp $");
+__RCSID("$NetBSD: mountd.c,v 1.127 2015/08/05 23:23:47 jnemeth Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -336,7 +336,6 @@
                (void)fprintf(stderr, "Here we go.\n");
        (void)signal(SIGHUP, get_exportlist);
        (void)signal(SIGTERM, send_umntall);
-       pidfile(NULL);
 
        rpcb_unset(RPCPROG_MNT, RPCMNT_VER1, NULL);
        rpcb_unset(RPCPROG_MNT, RPCMNT_VER3, NULL);
@@ -463,6 +462,7 @@
                (void)signal(SIGINT, SIG_IGN);
                (void)signal(SIGQUIT, SIG_IGN);
        }
+       pidfile(NULL);
        svc_run();
        syslog(LOG_ERR, "Mountd died");
        exit(1);



Home | Main Index | Thread Index | Old Index