Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: