Make signal-semaphore interrupt-safe

Fixes #2