Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
PostgreSQL 9.3 beta: Federated databases and more
LWN.net Weekly Edition for May 9, 2013
(Nearly) full tickless operation in 3.10
(Obviously you actually have helpers that do it. You don't repeat the code
everywhere, that'd be disgusting)
When the programmer is forced to handle return codes
Posted Dec 5, 2009 22:47 UTC (Sat) by cras (guest, #7000)
I've gotten rid of alarm()s in (most of) my code and there are no child processes, so I'd think close()s
are pretty safe to do without looping.. And with NFS I first fsync/fdatasync first anyway, so close
probably shouldn't fail anyway. Unless it can fail with EINTR even when it doesn't have to write
anything?.. That would seem almost like a bug.
Posted Dec 6, 2009 0:05 UTC (Sun) by nix (subscriber, #2304)
So I guess you know what happens in Linux when close() fails with EINTR
(with NFS)? It won't close the fd and it should be retried?
Since you have to loop for write()/read() anyway, looping for close() as
well is hardly a killer. (And, yes, I would rather that -EINTR would die
die die as fast as possible, but unfortunately it is not dead so we have
to deal with it.)
Posted Dec 6, 2009 0:29 UTC (Sun) by cras (guest, #7000)
Posted Dec 6, 2009 11:17 UTC (Sun) by nix (subscriber, #2304)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds