Avoid interposing pidfile(), use rk_pidfile() instead

This commit is contained in:
Viktor Dukhovni
2016-12-19 19:09:45 -05:00
parent bda422f40b
commit 7dc4481ed2
8 changed files with 8 additions and 10 deletions

View File

@@ -88,7 +88,7 @@ main(int argc, char **argv)
#endif
if (detach_from_console && !launchd_flag && daemon_child == -1)
roken_detach_prep(argc, argv, "--daemon-child");
pidfile(NULL);
rk_pidfile(NULL);
if (launchd_flag) {
heim_sipc mach;

View File

@@ -169,7 +169,7 @@ main(int argc, char **argv)
signal(SIGPIPE, SIG_IGN);
#endif
#endif
pidfile(NULL);
rk_pidfile(NULL);
switch_environment();

View File

@@ -901,7 +901,7 @@ main(int argc, char **argv)
signal(SIGTERM, sigterm);
#endif
pidfile(NULL);
rk_pidfile(NULL);
return doit(keytab, port);
}

View File

@@ -1128,7 +1128,7 @@ main(int argc, char **argv)
if (detach_from_console && daemon_child == -1)
roken_detach_prep(argc, argv, "--daemon-child");
pidfile(NULL);
rk_pidfile(NULL);
ret = krb5_init_context(&context);
if (ret)

View File

@@ -707,7 +707,7 @@ main(int argc, char **argv)
if (detach_from_console && daemon_child == -1)
roken_detach_prep(argc, argv, "--daemon-child");
pidfile(NULL);
rk_pidfile(NULL);
ret = krb5_init_context(&context);
if (ret)

View File

@@ -165,7 +165,7 @@ roken_detach_finish(const char *dir, int daemon_child_fd)
ssize_t bytes;
int fd;
pidfile(NULL);
rk_pidfile(NULL);
if (pipefds[1] == -1 && daemon_child_fd != -1)
pipefds[1] = daemon_child_fd;
if (pipefds[0] != -1)

View File

@@ -759,8 +759,7 @@ readv(int, const struct iovec *, int);
#ifdef NO_PIDFILES
#define pidfile(x) ((void) 0)
#else
#define pidfile rk_pidfile
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL pidfile (const char*);
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL rk_pidfile (const char*);
#endif
#ifndef HAVE_BSWAP64

View File

@@ -87,7 +87,7 @@ pidfile_cleanup(void)
}
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
pidfile(const char *bname)
rk_pidfile(const char *bname)
{
/*
* If the OS has a pidfile(), call that, but still call
@@ -95,7 +95,6 @@ pidfile(const char *bname)
* writing it twice will still work.
*/
#ifdef HAVE_PIDFILE
#undef pidfile
pidfile(bname);
#endif