[fpc-pascal] Translating from error numbers to symbolic name

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Fri Aug 3 22:18:09 CEST 2012

When using a function like fpAccept on a non-blocking socket, in some 
cases -1 is returned with a documented (Linux kernel) error code of 
EAGAIN. Should I be looking for this in errno or SocketError?

When I've retrieved a numeric code from errno or SocketError, is there a 
way of converting it to a concise literal such as 'EAGAIN'? I want the 
log to report that accept() has failed with EAGAIN, rather than having 
explanatory text that doesn't match the kernel documentation.

Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

More information about the fpc-pascal mailing list