Avoid interposing pidfile(), use rk_pidfile() instead
This commit is contained in:
@@ -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;
|
||||
|
@@ -169,7 +169,7 @@ main(int argc, char **argv)
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
#endif
|
||||
#endif
|
||||
pidfile(NULL);
|
||||
rk_pidfile(NULL);
|
||||
|
||||
switch_environment();
|
||||
|
||||
|
@@ -901,7 +901,7 @@ main(int argc, char **argv)
|
||||
signal(SIGTERM, sigterm);
|
||||
#endif
|
||||
|
||||
pidfile(NULL);
|
||||
rk_pidfile(NULL);
|
||||
|
||||
return doit(keytab, port);
|
||||
}
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user