Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin Use pidfile(3).
details: https://anonhg.NetBSD.org/src/rev/1fa4d683a76e
branches: trunk
changeset: 473509:1fa4d683a76e
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Jun 06 03:39:11 1999 +0000
description:
Use pidfile(3).
diffstat:
usr.sbin/update/Makefile | 5 ++++-
usr.sbin/update/update.c | 6 +++++-
usr.sbin/usbd/Makefile | 6 ++++--
usr.sbin/usbd/usbd.c | 7 +++++--
4 files changed, 18 insertions(+), 6 deletions(-)
diffs (93 lines):
diff -r d58cd5a41fdd -r 1fa4d683a76e usr.sbin/update/Makefile
--- a/usr.sbin/update/Makefile Sun Jun 06 03:27:35 1999 +0000
+++ b/usr.sbin/update/Makefile Sun Jun 06 03:39:11 1999 +0000
@@ -1,7 +1,10 @@
-# $NetBSD: Makefile,v 1.6 1997/03/12 18:50:06 mycroft Exp $
+# $NetBSD: Makefile,v 1.7 1999/06/06 03:39:11 thorpej Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
PROG= update
MAN= update.8
+LDADD+= -lutil
+DPADD+= ${LIBUTIL}
+
.include <bsd.prog.mk>
diff -r d58cd5a41fdd -r 1fa4d683a76e usr.sbin/update/update.c
--- a/usr.sbin/update/update.c Sun Jun 06 03:27:35 1999 +0000
+++ b/usr.sbin/update/update.c Sun Jun 06 03:39:11 1999 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: update.c,v 1.7 1999/06/06 03:39:11 thorpej Exp $ */
+
/*-
* Copyright (c) 1987, 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -41,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)update.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: update.c,v 1.6 1997/10/17 13:59:42 lukem Exp $");
+__RCSID("$NetBSD: update.c,v 1.7 1999/06/06 03:39:11 thorpej Exp $");
#endif
#endif /* not lint */
@@ -52,6 +54,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <util.h>
int main __P((int, char **));
void mysync __P((int));
@@ -90,6 +93,7 @@
usage();
daemon(0, 0);
+ pidfile(NULL);
sa.sa_handler = mysync;
sigemptyset(&sa.sa_mask);
diff -r d58cd5a41fdd -r 1fa4d683a76e usr.sbin/usbd/Makefile
--- a/usr.sbin/usbd/Makefile Sun Jun 06 03:27:35 1999 +0000
+++ b/usr.sbin/usbd/Makefile Sun Jun 06 03:39:11 1999 +0000
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.2 1998/07/12 20:40:44 augustss Exp $
+# $NetBSD: Makefile,v 1.3 1999/06/06 03:40:27 thorpej Exp $
PROG= usbd
MAN= usbd.8
+LDADD+= -lutil
+DPADD+= ${LIBUTIL}
+
.include <bsd.prog.mk>
-.include <bsd.subdir.mk>
diff -r d58cd5a41fdd -r 1fa4d683a76e usr.sbin/usbd/usbd.c
--- a/usr.sbin/usbd/usbd.c Sun Jun 06 03:27:35 1999 +0000
+++ b/usr.sbin/usbd/usbd.c Sun Jun 06 03:39:11 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbd.c,v 1.4 1998/12/09 00:57:19 augustss Exp $ */
+/* $NetBSD: usbd.c,v 1.5 1999/06/06 03:40:27 thorpej Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -43,6 +43,7 @@
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
+#include <util.h>
#include <sys/time.h>
#include <dev/usb/usb.h>
@@ -153,8 +154,10 @@
exit(0);
}
- if (!debug)
+ if (!debug) {
daemon(0, 0);
+ pidfile(NULL);
+ }
for (;;) {
FD_ZERO(&fdset);
Home |
Main Index |
Thread Index |
Old Index