Source-Changes-HG archive

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

[src/trunk]: src/sbin/routed Use pidfile(3).



details:   https://anonhg.NetBSD.org/src/rev/d05271db72c8
branches:  trunk
changeset: 473504:d05271db72c8
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Jun 06 02:00:32 1999 +0000

description:
Use pidfile(3).

diffstat:

 sbin/routed/Makefile |   5 ++++-
 sbin/routed/main.c   |  11 +++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diffs (58 lines):

diff -r a6b0fdb57c99 -r d05271db72c8 sbin/routed/Makefile
--- a/sbin/routed/Makefile      Sun Jun 06 01:59:40 1999 +0000
+++ b/sbin/routed/Makefile      Sun Jun 06 02:00:32 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.21 1999/02/23 10:51:53 christos Exp $
+#      $NetBSD: Makefile,v 1.22 1999/06/06 02:00:32 thorpej Exp $
 #      from: @(#)Makefile      8.1 (Berkeley) 6/19/93
 
 PROG=  routed
@@ -6,6 +6,9 @@
 MAN=   routed.8
 SUBDIR=        rtquery
 
+LDADD+=        -lutil
+DPADD+=        ${LIBUTIL}
+
 # By popular demand...
 MLINKS=        routed.8 rdisc.8
 #COPTS+=-g -DDEBUG -Wall
diff -r a6b0fdb57c99 -r d05271db72c8 sbin/routed/main.c
--- a/sbin/routed/main.c        Sun Jun 06 01:59:40 1999 +0000
+++ b/sbin/routed/main.c        Sun Jun 06 02:00:32 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.22 1999/02/25 10:56:47 ross Exp $   */
+/*     $NetBSD: main.c,v 1.23 1999/06/06 02:00:32 thorpej Exp $        */
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -38,7 +38,7 @@
 #define __COPYRIGHT(a) char copyright[] = a;
 #elif defined(__NetBSD__)
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: main.c,v 1.22 1999/02/25 10:56:47 ross Exp $");
+__RCSID("$NetBSD: main.c,v 1.23 1999/06/06 02:00:32 thorpej Exp $");
 #endif
 __COPYRIGHT("@(#) Copyright (c) 1983, 1988, 1993\n\
        The Regents of the University of California.  All rights reserved.\n");
@@ -52,6 +52,10 @@
 #include <fcntl.h>
 #include <sys/file.h>
 
+#if defined(__NetBSD__)
+#include <util.h>
+#endif
+
 pid_t  mypid;
 
 naddr  myaddr;                         /* system address */
@@ -291,6 +295,9 @@
                BADERR(0,"daemon()");
 #endif
 
+#if defined(__NetBSD__)
+       pidfile(NULL);
+#endif
        mypid = getpid();
        srandom((int)(clk.tv_sec ^ clk.tv_usec ^ mypid));
 



Home | Main Index | Thread Index | Old Index