News for hackers. Stuff that matters.
Re:Two things every Unix developer should know by cperciva on Saturday September 04, 2010 @12:31AM (#1662030)
The EINTR error can be raised at any time for any reason, so essentially every I/O operation on a Unix system must be prepared to handle this error properly. Surprisingly to some, this includes the C standard library functions such as fread(), fwrite(), and so on.

I think the editors of C99 and POSIX would be surprised by this too. Any non-buggy fread or fwrite should retry on EINTR.

Re:Two things every Unix developer should know by tbrownaw on Saturday September 04, 2010 @10:12AM (#1662727)
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.

Re:Two things every Unix developer should know by caf on Saturday September 04, 2010 @10:30AM (#1662755)
If you need that, you should be using the low-level read() / write() instead.
Re:Two things every Unix developer should know by sprout on Saturday September 04, 2010 @09:30AM (#1662648)
I came here to ask, does anyone know what Unix means in this context?
Re:Two things every Unix developer should know by patrickgzill on Saturday September 04, 2010 @10:04AM (#1662711)
Apparently "Unix" means "Linux" as the way this can be implemented varies from Unix to Unix.

Actually the introduction of this in the kernel back in '97 or so caused the company I was working for a lot of grief, and a quick recompile, since after a kernel upgrade the binaries we supplied were no longer working reliably.

Re:Two things every Unix developer should know by slava_pestov on Saturday September 04, 2010 @04:00PM (#1663290)
I should say, Unix in this context means any Unix-like system that Factor runs on (Linux, FreeBSD, OpenBSD, Mac OS X)
Re:Two things every Unix developer should know by sprout on Saturday September 04, 2010 @07:38PM (#1663666)
There are several claims made in the article, and I'm skeptical that all of those things are completely true for all of those.
Re:Two things every Unix developer should know by slava_pestov on Saturday September 04, 2010 @09:55PM (#1663840)
Each one is true for at least one of those platforms.
Re:Two things every Unix developer should know by tbrownaw on Saturday September 04, 2010 @10:17AM (#1662734)
POSIX.1 , according to my signal(7).