3 #include <sys/stdint.h>
7 pidfile(const char *basename)
10 pid_t otherpid, childpid;
12 if (basename != NULL) {
13 errx(EX_USAGE, "Need to impliment NetBSD semantics.");
16 pfh = pidfile_open(basename, 0644, &otherpid);
18 if (errno == EEXIST) {
19 errx(EXIT_FAILURE, "Daemon already running, pid: %jd.",
22 /* If we cannot create pidfile from other reasons, only warn. */
23 warn("Cannot open or create pidfile");