Fix a Valgrind hit that could cause an undefined set of signals to be blocked.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 21 Apr 2013 10:48:27 +0000 (12:48 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 21 Apr 2013 10:48:27 +0000 (12:48 +0200)
thread.cpp

index bd4cfd1..98c743c 100644 (file)
@@ -41,6 +41,7 @@ void *Thread::do_work_thunk(void *arg)
        // (This isn't strictly required, but it makes it easier to debug that indeed
        // SIGUSR1 was what woke us up.)
        sigset_t set;
+       sigemptyset(&set);
        sigaddset(&set, SIGHUP);
        int err = pthread_sigmask(SIG_BLOCK, &set, NULL);
        if (err != 0) {