diff options
-rw-r--r-- | rvnit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rvnit.c b/rvnit.c index e01992d..7e03bc6 100644 --- a/rvnit.c +++ b/rvnit.c @@ -485,8 +485,14 @@ main() fcntl(newlogfd[1], F_SETFD, FD_CLOEXEC); main_thread = pthread_self(); + + /* block all signals in the threads */ + sigset_t allset; + sigfillset(&allset); + sigprocmask(SIG_BLOCK, &allset, 0); pthread_create(&socket_thread, 0, socket_loop, 0); pthread_create(&logger_thread, 0, logger_loop, 0); + sigprocmask(SIG_UNBLOCK, &allset, 0); if (chdir("sv") < 0) { perror("chdir"); |