When the programmer is forced to handle return codes
Posted Dec 5, 2009 11:40 UTC (Sat) by
hppnq (guest, #14462)
In reply to:
When the programmer is forced to handle return codes by nix
Parent article:
On the importance of return codes
If the file descriptor is actually gone -- which I think is the case also if close() returns with EINTR --
it may have been reused already in a multi-threaded environment by the time you loop around: you
might close the wrong file. In a single-threaded environment, you should expect EBADF
immediately after the EINTR, I suppose.
(
Log in to post comments)