From fb665416571c8a08fb592630d327ffb03e1ce129 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Fri, 19 Jan 2007 07:11:40 +0000 Subject: [PATCH] Use pthread_sigmask over sigprocmask in an attempt to fix signals on linuxthreads machines --- src/os-unix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os-unix.c b/src/os-unix.c index d36ba0af..3dd17613 100644 --- a/src/os-unix.c +++ b/src/os-unix.c @@ -221,7 +221,7 @@ int os_signal_server(int what) { FILE *pid_fp; int pid; int result = TRUE; - int signal; + int signal = 0; if(NULL == (pid_fp = fopen(_os_pidfile, "r"))) { DPRINTF(E_LOG,L_MAIN,"fdopen: %s\n",strerror(errno)); @@ -442,7 +442,7 @@ int _os_start_signal_handler() { (sigaddset(&set,SIGHUP) == -1) || (sigaddset(&set,SIGCLD) == -1) || (sigaddset(&set,SIGTERM) == -1) || - (sigprocmask(SIG_BLOCK, &set, NULL) == -1)) { + (pthread_sigmask(SIG_BLOCK, &set, NULL) == -1)) { DPRINTF(E_LOG,L_MAIN,"Error setting signal set\n"); return -1; }