linux里I/O操作的通用error code,调用fclose(fd)调用返回了EAGAIN(errno=11)。EAGAIN不是真正的错误,可以忽略。
fclose有以下几种状态:
RETURN VALUES
If successful, fclose() returns a value of zero. On failure, it returns EOF, and sets errno to one of the following values:
EAGAIN
The O_NONBLOCK flag is set for the file descriptor underlying stream, and the process would be delayed in the write operation.
EBADF
The file descriptor underlying stream is not valid.
EFBIG
The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
EINTR
The fclose() function was interrupted by a signal.
ENOSPC
There was no free space remaining on the device containing the file.
EPIPE
An attempt was made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal is also sent to the process.