diff options
author | David Dykstra <dwd@samba.org> | 2003-01-26 03:53:34 +0000 |
---|---|---|
committer | David Dykstra <dwd@samba.org> | 2003-01-26 03:53:34 +0000 |
commit | aa2c47d83558ebb5def69d6c2fa2d6fe70b49db0 (patch) | |
tree | 948307a182becf7854c87429f0121a453b50e426 /cleanup.c | |
parent | 536b84680b4ab1f29fa456b4fa7b5b16eff4af8f (diff) | |
download | rsync-aa2c47d83558ebb5def69d6c2fa2d6fe70b49db0.tar.gz |
Better fix for infinite recursion; don't return from exit_cleanup
unless the nesting is already pretty deep, because there are normal
cases where exit_cleanup is nested shallowly. Patch from Marc Espie,
posted by Brian Poole.
Diffstat (limited to 'cleanup.c')
-rw-r--r-- | cleanup.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -63,11 +63,11 @@ void _exit_cleanup(int code, const char *file, int line) extern int log_got_error; static int inside_cleanup = 0; - if (inside_cleanup != 0) { + if (inside_cleanup > 10) { /* prevent the occasional infinite recursion */ return; } - inside_cleanup = 1; + inside_cleanup++; signal(SIGUSR1, SIG_IGN); signal(SIGUSR2, SIG_IGN); |