For reference (I'm not suggesting we do this here), for "how to protect against that", use `sigaction()` instead of `signal()` (which is archaic) and use a suitable `sa_mask` to protect the signal handler against interrupts.  See `man sigaction`.