]> git.sesse.net Git - cubemap/commitdiff
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 bd4cfd1790288e6dcb712820b3bc6725b9548732..98c743c594313704281c2360f2d5688c0c691cab 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) {