aboutsummaryrefslogtreecommitdiffstats
path: root/cleanup.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-28 10:43:31 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-28 10:43:31 +0000
commit27d3cdbc943a57d64f4f2a35a4f1e1b15d9ca41f (patch)
tree5f6d6b922fde0a13d36dfd1ea1609544e509975d /cleanup.c
parent106005004ec79d27c897a338a80eca8941208914 (diff)
downloadandroid_external_rsync-27d3cdbc943a57d64f4f2a35a4f1e1b15d9ca41f.tar.gz
android_external_rsync-27d3cdbc943a57d64f4f2a35a4f1e1b15d9ca41f.tar.bz2
android_external_rsync-27d3cdbc943a57d64f4f2a35a4f1e1b15d9ca41f.zip
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" ?
Diffstat (limited to 'cleanup.c')
-rw-r--r--cleanup.c8
1 files changed, 6 insertions, 2 deletions
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);
}