summaryrefslogtreecommitdiffstats
path: root/libexec/lukemftpd/nbsd_pidfile.h
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/lukemftpd/nbsd_pidfile.h')
-rw-r--r--libexec/lukemftpd/nbsd_pidfile.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/libexec/lukemftpd/nbsd_pidfile.h b/libexec/lukemftpd/nbsd_pidfile.h
deleted file mode 100644
index 5348770..0000000
--- a/libexec/lukemftpd/nbsd_pidfile.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* $FreeBSD$ */
-
-#include <sys/stdint.h>
-#include <sysexits.h>
-
-static int
-pidfile(const char *basename)
-{
- struct pidfh *pfh;
- pid_t otherpid, childpid;
-
- if (basename != NULL) {
- errx(EX_USAGE, "Need to implement NetBSD semantics.");
- }
-
- pfh = pidfile_open(basename, 0644, &otherpid);
- if (pfh == NULL) {
- if (errno == EEXIST) {
- errx(EXIT_FAILURE, "Daemon already running, pid: %jd.",
- (intmax_t)otherpid);
- }
- /* If we cannot create pidfile from other reasons, only warn. */
- warn("Cannot open or create pidfile");
- return -1;
- }
-
- pidfile_write(pfh);
- pidfile_close(pfh);
- return 0;
-}
OpenPOWER on IntegriCloud