Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a70d070
)
Prevent infinite recursion in exit_cleanup(). Patch from Sviatoslav Sviridov.
author
David Dykstra
<dwd@samba.org>
Thu, 16 Jan 2003 20:09:31 +0000
(20:09 +0000)
committer
David Dykstra
<dwd@samba.org>
Thu, 16 Jan 2003 20:09:31 +0000
(20:09 +0000)
NEWS
patch
|
blob
|
blame
|
history
cleanup.c
patch
|
blob
|
blame
|
history
diff --git
a/NEWS
b/NEWS
index
f44216c
..
0717163
100644
(file)
--- a/
NEWS
+++ b/
NEWS
@@
-55,6
+55,9
@@
rsync changes since last release
* Fixed bug in --copy-unsafe-links that caused it to be completely
broken. (Dave Dykstra)
* Fixed bug in --copy-unsafe-links that caused it to be completely
broken. (Dave Dykstra)
+ * Prevent infinite recursion in cleanup code under certain circumstances.
+ (Sviatoslav Sviridov)
+
INTERNAL:
* Many code cleanups and improved internal documentation. (Martin
INTERNAL:
* Many code cleanups and improved internal documentation. (Martin
diff --git
a/cleanup.c
b/cleanup.c
index
37e074a
..
b9e9dab
100644
(file)
--- a/
cleanup.c
+++ b/
cleanup.c
@@
-61,6
+61,13
@@
void _exit_cleanup(int code, const char *file, int line)
int ocode = code;
extern int keep_partial;
extern int log_got_error;
int ocode = code;
extern int keep_partial;
extern int log_got_error;
+ static int inside_cleanup = 0;
+
+ if (inside_cleanup != 0) {
+ /* prevent the occasional infinite recursion */
+ return;
+ }
+ inside_cleanup = 1;
signal(SIGUSR1, SIG_IGN);
signal(SIGUSR2, SIG_IGN);
signal(SIGUSR1, SIG_IGN);
signal(SIGUSR2, SIG_IGN);