Marco van de Voort wrote:
In our previous episode, Mark Morgan Lloyd said:
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?
Socketerror is more portable, but on *nix errno will work too.
Thanks, found that in the source.
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'?
See errors unit.
But if I'm reading that properly, it translates (some OS-specific
number) to 'Try again', not to 'EAGAIN' which is what the kernel docs
refer to and which can reasonably be logged without requiring i18n.
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]
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal