From 27d3cdbc943a57d64f4f2a35a4f1e1b15d9ca41f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 28 Oct 1998 10:43:31 +0000 Subject: syslog support in rsync daemon has been broken since I added the "log file" option. I wonder why noone reported it? Or did everyone just use "log file" ? --- cleanup.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cleanup.c') diff --git a/cleanup.c b/cleanup.c index abd7b0df..b4eac0c4 100644 --- a/cleanup.c +++ b/cleanup.c @@ -51,8 +51,12 @@ void exit_cleanup(int code) if (code) { kill_all(SIGUSR1); } - if ((cleanup_pid != 0) && (cleanup_pid == (int) getpid())) - unlink(lp_pid_file()); + if ((cleanup_pid != 0) && (cleanup_pid == (int) getpid())) { + char *pidf = lp_pid_file(); + if (pidf && *pidf) { + unlink(lp_pid_file()); + } + } exit(code); } -- cgit v1.2.3