Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
preparing for release of 2.2.0
[rsync/rsync.git]
/
cleanup.c
diff --git
a/cleanup.c
b/cleanup.c
index
abd7b0d
..
ee2fa4d
100644
(file)
--- a/
cleanup.c
+++ b/
cleanup.c
@@
-51,8
+51,15
@@
void exit_cleanup(int code)
if (code) {
kill_all(SIGUSR1);
}
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());
+ }
+ }
+
+ if (code) log_exit(code);
+
exit(code);
}
exit(code);
}