diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-01-06 21:43:35 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-01-06 21:45:57 +0100 |
commit | 5cef60e29c23554a02efc061dca0812b8a08a1e9 (patch) | |
tree | e62a96c3e342fc012b2ee88244b1b59788b6ce58 /rvnit.c | |
parent | 1e7605cb74db6803ea8cec11463164d5aacedc4b (diff) | |
download | rvnit-5cef60e29c23554a02efc061dca0812b8a08a1e9.tar.gz rvnit-5cef60e29c23554a02efc061dca0812b8a08a1e9.tar.xz rvnit-5cef60e29c23554a02efc061dca0812b8a08a1e9.zip |
block all signals in helper threads
Diffstat (limited to 'rvnit.c')
-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"); |