X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/ef1f62807e55fcd63ce734ef8fd9b32f4e58d659..434764269cc3f5bc2fc62f3789ff9d23a562d2d7:/cleanup.c diff --git a/cleanup.c b/cleanup.c index 0163dd25..b952cff0 100644 --- a/cleanup.c +++ b/cleanup.c @@ -26,6 +26,10 @@ extern int keep_partial; extern int log_got_error; extern char *partial_dir; +#ifdef HAVE_SIGACTION +static struct sigaction sigact; +#endif + /** * Close all open sockets and files, allowing a (somewhat) graceful * shutdown() of socket connections. This eliminates the abortive @@ -94,8 +98,8 @@ void _exit_cleanup(int code, const char *file, int line) } inside_cleanup++; - signal(SIGUSR1, SIG_IGN); - signal(SIGUSR2, SIG_IGN); + SIGACTION(SIGUSR1, SIG_IGN); + SIGACTION(SIGUSR2, SIG_IGN); if (verbose > 3) { rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): entered\n",