## 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/noexecconstant
errno/badfconstant
errno/childconstant
errno/nomemconstant
errno/accesconstant
errno/faultconstant
errno/busyconstant
errno/notdirconstant
errno/isdirconstant
errno/invalconstant
errno/mfileconstant
errno/nospcconstant
errno/spipeconstant
errno/pipeconstant
errno/againconstant
errno/rofsconstant
errno/existconstant
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 continuation)

Next: Module (chicken eval)