diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2016-11-15 05:37:14 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2016-11-15 06:23:17 +0100 |
commit | 24f5e2fc62606c25c4b43e2dd77aea9aa721acba (patch) | |
tree | 3aa5ce435a7fef3f8a7b568e5ac808b851664db1 /lib/pid_output.c | |
parent | build: chop down complicated CFLAGS logic (diff) | |
download | frr-24f5e2fc62606c25c4b43e2dd77aea9aa721acba.tar.xz frr-24f5e2fc62606c25c4b43e2dd77aea9aa721acba.zip |
build: massively remove needless checks
Since we have autoconf results from a wide swath of target platforms, we
can go remove checks that have the same result on all systems.
This also removes several "fallback" implementations of functions that,
at some point in the history, weren't available on all target platforms.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
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 de4c2fba9..ba1f37476 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 */ |