Chicken » Module (chicken errno)

## Module (chicken errno)

This module provides access to the standard C `errno` value.

Be careful, if you're using threads, `errno` might be clobbered as soon as another thread calls a C function. To prevent this from happening, you can add `(declare (disable-interrupts))` at the top of your file, or use the `-disable-interrupts` compiler option to avoid any context switches while a procedure in this file is running.

### errno

errnoprocedure

  Returns the error code of the last system call.

### errno constants

errno/permconstant
errno/noentconstant
errno/srchconstant
errno/intrconstant
errno/ioconstant
errno/nxioconstant
errno/2bigconstant
errno/noexecconstant
errno/badfconstant
errno/childconstant
errno/againconstant
errno/nomemconstant
errno/accesconstant
errno/faultconstant
errno/busyconstant
errno/existconstant
errno/xdevconstant
errno/nodevconstant
errno/notdirconstant
errno/isdirconstant
errno/invalconstant
errno/nfileconstant
errno/mfileconstant
errno/nottyconstant
errno/fbigconstant
errno/nospcconstant
errno/spipeconstant
errno/rofsconstant
errno/mlinkconstant
errno/pipeconstant
errno/domconstant
errno/rangeconstant
errno/deadlkconstant
errno/nametoolongconstant
errno/nolckconstant
errno/nosysconstant
errno/notemptyconstant
errno/ilseqconstant
errno/wouldblockconstant

  These variables contain error codes as returned by `errno`.

  NOTE: On Windows, `EWOULDBLOCK` does not exist. For consistency, `errno/wouldblock` does exist, but it is defined as zero.

  This does mean that in case there is no error, it looks like the `errno/wouldblock` error is returned. But you have to check the return code of a system call before accessing `errno` anyway, so this should typically never happen.

Previous: Module (chicken csi)

Next: Module (chicken eval)