3 ms·
EINTR is retried automatically if you use sigaction() and set the SA_RESTART flag. If you use signal() instead of sigaction() it depends on your OS whether EIN
by noselasd 10y ago
EINTR is retried automatically if you use sigaction() and set the SA_RESTART flag.
If you use signal() instead of sigaction() it depends on your OS whether EINTR is automatically retried - never use signal().
(There's a few exceptions still - partial completed syscalls, e.g. a signal can cause read() to return partial data or sleep() to return before it should - neither case gives you EINTR though)