LWN.net Logo

When the programmer is forced to handle return codes

When the programmer is forced to handle return codes

Posted Dec 6, 2009 0:29 UTC (Sun) by cras (guest, #7000)
In reply to: When the programmer is forced to handle return codes by nix
Parent article: On the importance of return codes

That also makes me wonder about my fsync/fdatasync calls. I suppose they can also fail with EINTR.
Anyway, as I mentioned above, all signals causing those to my program nowdays should be
external so I don't think I will be doing anything about this problem. (Handling is the same for
EINTR as for EDQUOT/ESPACE.) Interesting to realize it could be a problem, of course.


(Log in to post comments)

When the programmer is forced to handle return codes

Posted Dec 6, 2009 11:17 UTC (Sun) by nix (subscriber, #2304) [Link]

POSIX documents that fsync() can return EINTR but does not document it for
fdatasync(). This seems likely to be an oversight to me.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds