Use pidfile(3).

This commit is contained in:
thorpej 1999-06-06 02:52:16 +00:00
parent b457dede0f
commit 07414356ac
2 changed files with 9 additions and 3 deletions

View File

@ -1,7 +1,10 @@
# $NetBSD: Makefile,v 1.7 1997/10/16 07:36:58 lukem Exp $
# $NetBSD: Makefile,v 1.8 1999/06/06 03:21:43 thorpej Exp $
PROG= mopd
SRCS= mopd.c process.c
MAN= mopd.8
LDADD+= -lutil
DPADD+= ${LIBUTIL}
.include <bsd.prog.mk>

View File

@ -1,4 +1,4 @@
/* $NetBSD: mopd.c,v 1.5 1997/10/16 23:25:17 lukem Exp $ */
/* $NetBSD: mopd.c,v 1.6 1999/06/06 03:21:43 thorpej Exp $ */
/*
* Copyright (c) 1993-96 Mats O Jansson. All rights reserved.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mopd.c,v 1.5 1997/10/16 23:25:17 lukem Exp $");
__RCSID("$NetBSD: mopd.c,v 1.6 1999/06/06 03:21:43 thorpej Exp $");
#endif
/*
@ -53,6 +53,8 @@ __RCSID("$NetBSD: mopd.c,v 1.5 1997/10/16 23:25:17 lukem Exp $");
#include "process.h"
#include "rc.h"
#include <util.h>
/*
* The list of all interfaces that are being listened to.
* "selects" on the descriptors in this list.
@ -141,6 +143,7 @@ main(argc, argv)
/* Fade into the background */
daemon(0, 0);
pidfile(NULL);
}
syslog(LOG_INFO, "%s %s started.", __progname, version);