Error conditions

The following table indicates which optional errors, (denoted by "may fail" within the specification), listed in the System Interfaces Volume are detected in the circumstances specified:

Function Error Detected
access() EINVAL Yes
  ENAMETOOLONG Yes
  ETXTBSY No
chdir() ENAMETOOLONG Yes
  ELOOP Yes
clock_settime() EPERM Yes
close() EIO Yes
closedir() EBADF Yes
  EINTR Yes
erfc(), erfcf(), erfcl() Range Error Yes
exp(), expf(), expl() Range Error Yes
exp2(), exp2f(), exp2l() Range Error Yes
expm1(), expm1f() Range Error Yes
fchdir() EINTR Yes
  EIO No
fclose() ENXIO No
fcntl() EDEADLK Yes
fdim(), fdimf(), fdiml() Range Error Yes
fdopen() EBADF No
  EINVAL Yes
  EMFILE No
  ENOMEM Yes
fflush() ENXIO Yes
fgetc() ENOMEM No
  ENXIO Yes
fgetpos() EBADF Yes
  ESPIPE Yes
fgetwc() ENOMEM No
  ENXIO Yes
fileno() EBADF No
fmod(), fmodf(), fmodl() Range Error Yes
fopen() EINVAL Yes
  ELOOP Yes
  EMFILE Yes
  ENAMETOOLONG Yes
  ENOMEM Yes
  ETXTBSY Yes
fpathconf() EBADF Yes
  EINVAL Yes
fputc() ENOMEM No
  ENXIO Yes
fread() ENOMEM No
  ENXIO Yes
freopen() EINVAL Yes
  ELOOP Yes
  ENAMETOOLONG Yes
  ENOMEM Yes
  ENXIO Yes
  ETXTBSY Yes
fscanf() ENOMEM No
  ENXIO Yes
fstat() EOVERFLOW Yes
ftell() ESPIPE Yes
getcwd() EACCES Yes
  ENOMEM Yes
ldexp(), ldexpf(), ldexpl() Range Error Yes
link() ELOOP Yes
  ENAMETOOLONG Yes
mkdir() ELOOP Yes
  ENAMETOOLONG Yes
mktime() EOVERFLOW No
mlock() EINVAL Yes
  ENOMEM Yes
munlock() EINVAL Yes
mlockall() ENOMEM Yes
  EPERM Yes
mq_getattr() EBADF Yes
mq_receive() EBADF Yes
mq_timedreceive() EBADF Yes
open() EAGAIN No
  EINVAL Yes
  ELOOP Yes
  ENAMETOOLONG Yes
  ETXTBSY Yes
opendir() ELOOP Yes
  EMFILE Yes
  ENAMETOOLONG Yes
  ENFILE Yes
pathconf() EACCES Yes
  EINVAL Yes
  ELOOP Yes
  ENAMETOOLONG Yes
  ENOENT Yes
  ENOTDIR Yes
posix_trace_*() Not supported Not supported
pow(), powf(), powl() Range Error Yes
pthread_attr_destroy() EINVAL No
pthread_attr_init() EBUSY No
pthread_attr_getdetachstate() EINVAL No
pthread_attr_setdetachstate() EINVAL No
pthread_attr_getguardsize() EINVAL No
pthread_attr_setguardsize() EINVAL No
pthread_attr_getinheritsched() EINVAL No
pthread_attr_setinheritsched() EINVAL No
  ENOTSUP No
pthread_attr_getschedparam() EINVAL No
pthread_attr_setschedparam() EINVAL No
  ENOTSUP No
pthread_attr_getschedpolicy() EINVAL No
pthread_attr_setschedpolicy() EINVAL No
  ENOTSUP No
pthread_attr_getscope() EINVAL No
pthread_attr_setscope() EINVAL Yes
  ENOTSUP Yes
pthread_attr_getstack() EINVAL No
pthread_attr_setstack() EINVAL No
  EBUSY No
pthread_attr_getstackaddr() EINVAL No
pthread_attr_setstackaddr() EINVAL No
pthread_attr_getstacksize() EINVAL No
pthread_attr_setstacksize() EINVAL No
pthread_cancel() ESRCH Yes
pthread_cond_broadcast() EINVAL Yes
pthread_cond_signal() EINVAL Yes
pthread_cond_destroy() EBUSY Yes
  EINVAL Yes
pthread_cond_init() EBUSY Yes
  EINVAL Yes
pthread_cond_timedwait() EINVAL Yes
  EPERM Yes
pthread_cond_wait() EINVAL Yes
  EPERM Yes
pthread_condattr_destroy() EINVAL No
pthread_condattr_getclock() EINVAL No
pthread_condattr_setclock() EINVAL No
pthread_condattr_getpshared() EINVAL No
pthread_condattr_setpshared() EINVAL No
pthread_create() EINVAL Yes
pthread_detach() EINVAL Yes
  ESRCH Yes
pthread_getcpuclockid() ESRCH Yes
pthread_getschedparam() ESRCH Yes
pthread_setschedparam() EINVAL Yes
  ENOTSUP Yes
  EPERM Yes
  ESRCH Yes
pthread_setspecific() ESRCH No
pthread_join() EDEADLK Yes
  EINVAL Yes
pthread_key_delete() EINVAL Yes
pthread_mutex_destroy() EBUSY Yes
  EINVAL Yes
pthread_mutex_init() EBUSY Yes
  EINVAL Yes
pthread_mutex_lock() EINVAL Yes
  EDEADLK Yes
pthread_mutex_trylock() EINVAL Yes
pthread_mutex_unlock() EINVAL Yes
  EPERM Yes
pthread_mutex_timedlock() EINVAL Yes
  EDEADLK Yes
pthread_mutexattr_destroy() EINVAL No
pthread_mutexattr_getprioceiling() EINVAL No
  EPERM No
pthread_mutexattr_setprioceiling() EINVAL Yes
  EPERM No
pthread_mutexattr_getprotocol() EINVAL No
  EPERM No
pthread_mutexattr_setprotocol() EINVAL Yes
  EPERM No
pthread_mutexattr_getpshared() EINVAL No
pthread_mutexattr_setpshared() EINVAL No
pthread_mutexattr_gettype() EINVAL No
pthread_mutexattr_settype() EINVAL Yes
pthread_once() EINVAL No
pthread_setcancelstate() EINVAL Yes
pthread_setcanceltype() EINVAL Yes
pthread_schedprio() EINVAL Yes
  ENOTSUP No
  EPERM Yes
  ESRCH Yes
putc() ENOMEM No
  ENXIO Yes
putchar() ENOMEM No
  ENXIO Yes
puts() ENOMEM No
  ENXIO Yes
read() EIO Yes
  ENOBUFS Yes
  ENOMEM Yes
  ENXIO Yes
readdir() EBADF Yes
  ENOENT No
remove() EBUSY No
  ELOOP Yes
  ENAMETOOLONG Yes
  ETXTBSY No
rename() ELOOP Yes
  ENAMETOOLONG Yes
  ETXTBSY No
rmdir() ELOOP Yes
  ENAMETOOLONG Yes
sem_close() EINVAL Yes
sem_destroy() EINVAL Yes
  EBUSY Yes
sem_getvalue() EINVAL Yes
sem_post() EINVAL Yes
sem_timedwait() EDEADLK No
  EINTR Yes
  EINVAL Yes
sem_trywait() EDEADLK No
  EINTR Yes
  EINVAL Yes
sem_wait() EDEADLK No
  EINTR Yes
  EINVAL Yes
setvbuf() EBADF No
sigaction() EINVAL Yes
sigaddset() EINVAL Yes
sigdelset() EINVAL Yes
sigismember() EINVAL Yes
signal() EINVAL Yes
sigtimedwait() EINVAL Yes
sigwait() EINVAL No
sigwaitinfo() EINVAL No
stat() ELOOP Yes
  ENAMETOOLONG Yes
  EOVERFLOW Yes
strcoll() EINVAL No
strerror() EINVAL No
strerror_r() ERANGE Yes
strtod(), strtof(), strtold() EINVAL Yes
strtoimax() EINVAL Yes
strtol() EINVAL Yes
strtoul() EINVAL Yes
strtoumax() EINVAL Yes
strxfrm() EINVAL No
timer_delete() EINVAL Yes
timer_getoverrun() EINVAL Yes
timer_gettime() EINVAL Yes
timer_settime() EINVAL Yes
tmpfile() EMFILE Yes
  ENOMEM Yes
unlink() ELOOP Yes
  ENAMETOOLONG Yes
  ETXTBSY No
utime() ELOOP Yes
  ENAMETOOLONG Yes
vfscanf() EILSEQ Yes
  EINVAL No
  ENOMEM No
  ENXIO Yes
write() ENETDOWN Yes
  ENETUNREACH Yes
  ENXIO Yes