diff options
| author | David Dykstra <dwd@samba.org> | 2003-01-16 20:09:31 +0000 |
|---|---|---|
| committer | David Dykstra <dwd@samba.org> | 2003-01-16 20:09:31 +0000 |
| commit | b765ec32b93d8fa78f19a48fbc7cc9066beb488e (patch) | |
| tree | e4636892ed8d41ec3321952409173d17fd86b570 /cleanup.c | |
| parent | a70d070cc52c177bd974e6787788f946be9cb285 (diff) | |
| download | android_external_rsync-b765ec32b93d8fa78f19a48fbc7cc9066beb488e.tar.gz android_external_rsync-b765ec32b93d8fa78f19a48fbc7cc9066beb488e.tar.bz2 android_external_rsync-b765ec32b93d8fa78f19a48fbc7cc9066beb488e.zip | |
Prevent infinite recursion in exit_cleanup(). Patch from Sviatoslav Sviridov.
Diffstat (limited to 'cleanup.c')
| -rw-r--r-- | cleanup.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); |
