История изменений
Исправление PPP328, (текущая версия) :
The fclose() function shall fail if:
[EAGAIN]
[CX] [Option Start] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation. [Option End]
[EBADF]
[CX] [Option Start] The file descriptor underlying stream is not valid. [Option End]
[EFBIG]
[CX] [Option Start] An attempt was made to write a file that exceeds the maximum file size. [Option End]
[EFBIG]
[XSI] [Option Start] An attempt was made to write a file that exceeds the process' file size limit. [Option End]
[EFBIG]
[CX] [Option Start] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream. [Option End]
[EINTR]
[CX] [Option Start] The fclose() function was interrupted by a signal. [Option End]
[EIO]
[CX] [Option Start] The process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions. [Option End]
[ENOSPC]
[CX] [Option Start] There was no free space remaining on the device containing the file. [Option End]
[EPIPE]
[CX] [Option Start] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread. [Option End]
The fclose() function may fail if:
[ENXIO]
[CX] [Option Start] A request was made of a nonexistent device, or the request was outside the capabilities of the device. [Option End]
Ни один из этих кодов (ну разве кроме EAGAIN, но он не выскочит потому что никто не делает дескрипторы асинхронными) не подразумевает, что можно попробовать еще раз чтобы закрыть дескриптор. Запись в лог сообщения типа «This error may also be returned under implementation-defined conditions.» не информативно от слова никак.
Исходная версия PPP328, :
[qoute]The fclose() function shall fail if:
[EAGAIN] [CX] [Option Start] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation. [Option End] [EBADF] [CX] [Option Start] The file descriptor underlying stream is not valid. [Option End] [EFBIG] [CX] [Option Start] An attempt was made to write a file that exceeds the maximum file size. [Option End] [EFBIG] [XSI] [Option Start] An attempt was made to write a file that exceeds the process' file size limit. [Option End] [EFBIG] [CX] [Option Start] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream. [Option End] [EINTR] [CX] [Option Start] The fclose() function was interrupted by a signal. [Option End] [EIO] [CX] [Option Start] The process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions. [Option End] [ENOSPC] [CX] [Option Start] There was no free space remaining on the device containing the file. [Option End] [EPIPE] [CX] [Option Start] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread. [Option End] The fclose() function may fail if:
[ENXIO] [CX] [Option Start] A request was made of a nonexistent device, or the request was outside the capabilities of the device. [Option End]
Ни один из этих кодов (ну разве кроме EAGAIN, но он не выскочит потому что никто не делает дескрипторы асинхронными) не подразумевает, что можно попробовать еще раз чтобы закрыть дескриптор. Запись в лог сообщения типа «This error may also be returned under implementation-defined conditions.» не информативно от слова никак.