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

Any non-buggy fread or fwrite should retry on EINTR.

But maybe not unconditionally retry. Say you got SIGTERM while waiting on network I/O and need to go flush something to disk and exit (instead of just resuming your wait or calling arbitrary code from your signal handler), or you got SIGCHLD on a subprocess and need to clean up stuff related to that.



If you need that, you should be using the low-level read() / write() instead.




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

Search: