News for hackers. Stuff that matters.
Re:POSIX close(2) is broken by tedunangst on Saturday December 17, 2011 @10:42AM (#3364393)
Interesting, I didn't know anything actually refused to close the file. HP-SUX sucks again.

From one standpoint, I can see that would even be the desired behavior, because it gives the app the opportunity to deal with the error in some meaningful way, like to finish flushing. But since everybody else has long since decided that if you care you flush then close, being different is just aggravating. Although it sounds like flush then close will work everywhere.

Re:POSIX close(2) is broken by ScottBurson on Saturday December 17, 2011 @12:14PM (#3364581)
I think it's AIX that's truly broken in this case, returning EINTR even though it did actually close the descriptor.

If every implementation returned success when it had closed the descriptor and EINTR only when it hadn't, this would be easy.