After SIGINT receiving rsync deamon hangs with next stack: #0 0x00002b96891cf01e in __lll_lock_wait_private () from /lib64/libc.so.6 #1 0x00002b9689165e5d in _L_lock_15302 () from /lib64/libc.so.6 #2 0x00002b968916445f in malloc_atfork () from /lib64/libc.so.6 #3 0x00002b968915017a in __fopen_internal () from /lib64/libc.so.6 #4 0x000000000041ff92 in logfile_open () at log.c:153 #5 0x000000000041e8ec in logit (code=FERROR, buf=0x7fff3cfc2060 "rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(545) [Receiver=3.0.7]\n", len=92, is_utf8=0) at log.c:116 #6 rwrite (code=FERROR, buf=0x7fff3cfc2060 "rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(545) [Receiver=3.0.7]\n", len=92, is_utf8=0) at log.c:285 #7 0x000000000041ede5 in rprintf (code=FERROR, format=0x4471b0 "rsync error: %s (code %d) at %s(%d) [%s=%s]\n") at log.c:405 #8 0x000000000041eeec in log_exit (code=20, file=0x4446f5 "rsync.c", line=545) at log.c:836 #9 0x00000000004133f9 in _exit_cleanup (code=20, file=0x4446f5 "rsync.c", line=545) at cleanup.c:190 #10 0x000000000040ab62 in sig_int (val=<value optimized out>) at rsync.c:545 #11 <signal handler called> #12 0x00002b968915debc in ptmalloc_unlock_all () from /lib64/libc.so.6 #13 0x00002b968918947f in fork () from /lib64/libc.so.6 #14 0x000000000042c945 in start_accept_loop (port=12666, fn=0x436a80 <start_daemon>) at socket.c:597 #15 0x00000000004382d7 in daemon_main () at clientserver.c:1069 #16 0x000000000041be2a in main (argc=0, argv=0x0) at main.c:1479 I think problem that _exit_cleanup uses non reentrant function fopen (not sure that only it)