Set sigmask on the main thread to block signals