diff options
Diffstat (limited to 'lib/pid_output.c')
| -rw-r--r-- | lib/pid_output.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/pid_output.c b/lib/pid_output.c index de4c2fba99..ba1f37476e 100644 --- a/lib/pid_output.c +++ b/lib/pid_output.c @@ -27,35 +27,6 @@ #include "network.h" #define PIDFILE_MASK 0644 -#ifndef HAVE_FCNTL - -pid_t -pid_output (const char *path) -{ - FILE *fp; - pid_t pid; - mode_t oldumask; - - pid = getpid(); - - oldumask = umask(0777 & ~PIDFILE_MASK); - fp = fopen (path, "w"); - if (fp != NULL) - { - fprintf (fp, "%d\n", (int) pid); - fclose (fp); - umask(oldumask); - return pid; - } - /* XXX Why do we continue instead of exiting? This seems incompatible - with the behavior of the fcntl version below. */ - zlog_warn("Can't fopen pid lock file %s (%s), continuing", - path, safe_strerror(errno)); - umask(oldumask); - return -1; -} - -#else /* HAVE_FCNTL */ pid_t pid_output (const char *path) @@ -107,5 +78,3 @@ pid_output (const char *path) } return pid; } - -#endif /* HAVE_FCNTL */ |
