mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-24 14:48:16 -04:00
Prevent infinite recursion in exit_cleanup(). Patch from Sviatoslav Sviridov.
This commit is contained in:
1 parent
a70d070cc5
commit
b765ec32b9
2 files changed
+10
No files matched your search
@@ -55,6 +55,9 @@ rsync changes since last release
|
||||
* 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
|
||||
|
||||
@@ -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;
|
||||
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);
|
||||
|
||||
Reference in new issue
Block a user