Periodic alarm signals can cause a retry loop to get stuck
while (interruptible_syscall() == FAILED && errno == EINTR);
can cause a hang if the syscall takes a long time and cannot be resumed, as it will forced to restart from the beginning each time it gets interrupted. If the syscall takes longer than the interval between successive alarm signals, it will be stuck in this loop forever. This was found to occur with
statfs64 (indirectly called by
open on SSHFS on Mac OS X.
So far there seems to be no way to guarantee the suspension of signals except through low-level tools like