Node:Error Recovery, Next:Binary Streams, Previous:EOF and Errors, Up:I/O on Streams
You may explicitly clear the error and EOF flags with the clearerr
function.
void clearerr (FILE *stream) | Function |
This function clears the end-of-file and error indicators for the stream stream. The file positioning functions (see File Positioning) also clear the end-of-file indicator for the stream. |
void clearerr_unlocked (FILE *stream) | Function |
The clearerr_unlocked function is equivalent to the clearerr
function except that it does not implicitly lock the stream.
This function is a GNU extension.
|
EINTR
(see Interrupted Primitives).
Many stream I/O implementations will treat it as an ordinary error, which
can be quite inconvenient. You can avoid this hassle by installing all
signals with the SA_RESTART
flag.
For similar reasons, setting nonblocking I/O on a stream's file
descriptor is not usually advisable.