errno

public func errno() -> Int32

Returns the current value of errno for the calling thread.

Read it immediately after a failing libc call — any subsequent syscall (including the success of an unrelated one) may overwrite it. Implementation forwards to the platform-specific accessor: __error on darwin, __errno_location on linux.

Defined in lang/std/net/libc.ks