error: add ENXIO for O_NONBLOCK FIFO open()

When opening FIFO with `O_NONBLOCK` flag, `ENXIO` could be returned if
the readable side hasn't yet opened this FIFO.
This commit is contained in:
Fedor Indutny 2014-03-06 20:26:11 +04:00
parent c0c9480e02
commit 4f72f2145b
2 changed files with 2 additions and 0 deletions

View File

@ -134,6 +134,7 @@ extern "C" {
XX( 61, ENOPROTOOPT, "protocol not available") \
XX( 62, ETXTBSY, "text file is busy") \
XX( 63, ERANGE, "result too large") \
XX( 64, ENXIO, "no such device or address") \
#define UV_ERRNO_GEN(val, name, s) UV_##name = val,

View File

@ -108,6 +108,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
case ENOPROTOOPT: return UV_ENOPROTOOPT;
case ETXTBSY: return UV_ETXTBSY;
case ERANGE: return UV_ERANGE;
case ENXIO: return UV_ENXIO;
default: return UV_UNKNOWN;
}
UNREACHABLE();