From: Matthias Schmidt Date: Thu, 27 Dec 2007 15:29:40 +0000 (+0000) Subject: Pass NULL instead of getprogname() to pidfile(). pidfile() will automatically X-Git-Tag: v2.0.1~1540 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/9b5ae8ee4ed62bc62e4ceda33d5e6c713a7ae5ce Pass NULL instead of getprogname() to pidfile(). pidfile() will automatically detect if the option is NULL and insert the appropriate basename. --- diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c index 1aafda3bde..c7b5cc86cd 100644 --- a/usr.sbin/apmd/apmd.c +++ b/usr.sbin/apmd/apmd.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/apmd/apmd.c,v 1.3.2.1 2001/08/13 17:30:30 nsayer Exp $ - * $DragonFly: src/usr.sbin/apmd/apmd.c,v 1.5 2005/08/28 20:55:07 liamfoy Exp $ + * $DragonFly: src/usr.sbin/apmd/apmd.c,v 1.6 2007/12/27 15:29:40 matthias Exp $ */ #include @@ -672,7 +672,7 @@ main(int ac, char* av[]) } restart(); - pidfile(getprogname()); + pidfile(NULL); event_loop(); exit(EXIT_SUCCESS); } diff --git a/usr.sbin/battd/battd.c b/usr.sbin/battd/battd.c index b6466e0f3a..28973e1f8d 100644 --- a/usr.sbin/battd/battd.c +++ b/usr.sbin/battd/battd.c @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/usr.sbin/battd/battd.c,v 1.10 2005/08/28 20:15:38 liamfoy Exp $ + * $DragonFly: src/usr.sbin/battd/battd.c,v 1.11 2007/12/27 15:29:40 matthias Exp $ * * Dedicated to my grandfather Peter Foy. Goodnight... */ @@ -351,7 +351,7 @@ main(int argc, char **argv) #endif if (daemon(0, 0) == -1) err(1, "daemon failed"); - pidfile(getprogname()); + pidfile(NULL); #ifdef DEBUG } #endif diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c index b81fbc6646..fda528af76 100644 --- a/usr.sbin/rwhod/rwhod.c +++ b/usr.sbin/rwhod/rwhod.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1983, 1993 The Regents of the University of California. All rights reserved. * @(#)rwhod.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.sbin/rwhod/rwhod.c,v 1.13.2.2 2000/12/23 15:28:12 iedowse Exp $ - * $DragonFly: src/usr.sbin/rwhod/rwhod.c,v 1.23 2005/07/01 13:13:00 liamfoy Exp $ + * $DragonFly: src/usr.sbin/rwhod/rwhod.c,v 1.24 2007/12/27 15:29:40 matthias Exp $ */ #include @@ -232,7 +232,7 @@ main(int argc, char *argv[]) usage(); #ifndef DEBUG daemon(1, 0); - pidfile(getprogname()); + pidfile(NULL); #endif signal(SIGHUP, hup); openlog("rwhod", LOG_PID, LOG_DAEMON);