summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2014-10-12 08:55:26 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2014-10-12 08:55:26 +0000
commitb1d05c2efb2dd6636545f9faa13da444df21919c (patch)
treeb126c1947f84a44604db7954622d8d0ac21fb66e /usr.sbin
parent268bf2f0c771b7d9026384f1dec0cce61baa9198 (diff)
cut out writing a pidfile. rc.d doesnt rely on it, and nor should you.
both bcook@ and schwartz@ suggested removing the pidfil unlink and path ok sthen@ schwartz@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/inetd/inetd.c16
-rw-r--r--usr.sbin/inetd/pathnames.h3
2 files changed, 2 insertions, 17 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index 02032df2b27..e1ef826390e 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inetd.c,v 1.138 2014/06/17 03:12:37 lteo Exp $ */
+/* $OpenBSD: inetd.c,v 1.139 2014/10/12 08:55:25 dlg Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
@@ -271,7 +271,6 @@ void retry(int);
void doretry(void);
void die(int);
void dodie(void);
-void logpid(void);
void spawn(struct servtab *, int);
int gettcp(struct servtab *);
int setconfig(void);
@@ -385,7 +384,6 @@ main(int argc, char *argv[])
}
openlog("inetd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
- logpid();
if (getrlimit(RLIMIT_NOFILE, &rlim_nofile) < 0) {
syslog(LOG_ERR, "getrlimit: %m");
@@ -947,7 +945,6 @@ dodie(void)
}
(void)close(sep->se_fd);
}
- (void)unlink(_PATH_INETDPID);
exit(0);
}
@@ -1556,17 +1553,6 @@ inetd_setproctitle(char *a, int s)
setproctitle("-%s", a);
}
-void
-logpid(void)
-{
- FILE *fp;
-
- if ((fp = fopen(_PATH_INETDPID, "w")) != NULL) {
- fprintf(fp, "%ld\n", (long)getpid());
- (void)fclose(fp);
- }
-}
-
int
bump_nofile(void)
{
diff --git a/usr.sbin/inetd/pathnames.h b/usr.sbin/inetd/pathnames.h
index 4be728c3d2b..a127f8b6823 100644
--- a/usr.sbin/inetd/pathnames.h
+++ b/usr.sbin/inetd/pathnames.h
@@ -27,10 +27,9 @@
* SUCH DAMAGE.
*
* from: @(#)pathnames.h 5.3 (Berkeley) 6/1/90
- * $Id: pathnames.h,v 1.2 2003/06/02 23:36:53 millert Exp $
+ * $Id: pathnames.h,v 1.3 2014/10/12 08:55:25 dlg Exp $
*/
#include <paths.h>
#define _PATH_INETDCONF "/etc/inetd.conf"
-#define _PATH_INETDPID "/var/run/inetd.pid"