News for hackers. Stuff that matters.
Re:Everything in C is undefined behavior by wahern on Thursday May 21, 2026 @05:13AM (#48219850)
No. You only get EINTR when a signal handler fires and you didn't use the SA_RESTART flag with sigaction. If you don't install any signal handlers, or you use SA_RESTART on all handlers, or you've blocked/masked all signals (or at least the ones with handlers), you won't get EINTR.

When writing library code, it's important to consider EINTR because you can't know about signal dispositions. Though, the common practice of looping on EINTR kind of defeats the purpose.

There are no comments on this comment yet.