LWN.net Logo

When the programmer is forced to handle return codes

When the programmer is forced to handle return codes

Posted Dec 7, 2009 23:02 UTC (Mon) by cventers (subscriber, #31465)
In reply to: When the programmer is forced to handle return codes by nix
Parent article: On the importance of return codes

Multithreaded programs might reallocate the fd before your thread got the opportunity to see an EBADF. If you broke the loop on success as well, you'd be mostly okay, except for the unspecified status of the fd as per UNIX 98...


(Log in to post comments)

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