5 ms·
Only if the signal that was caught isn't using SA_RESTART: https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaction.html https://pubs.opengroup.org/
by cesarb 6y ago
Only if the signal that was caught isn't using SA_RESTART: https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaction.html https://pubs.opengroup.org/onlinepubs/9699919799/functions/s... ("If set, and a function specified as interruptible is interrupted by this signal, the function shall restart and shall not fail with [EINTR] unless otherwise specified.")
Therefore, correct code can also not handle EINTR as long as it uses SA_RESTART for all non-fatal signals. That's probably the most common case (nobody likes EINTR).