The philosophy of errno
Date: Wed, 09 Feb 2005 20:21:10 +0000
Suppose a function that needs to return an error
condition using errno.
What is the good programming for this?
Do I need to clear errno in case of *NO* error?
Or is just enough to return some non-zero value and
set errno to the appropriate code in case of error
and return zero if no error occured don't caring about
errno in this case?
- Re: Implementing my own memcpy
... I didn't advocate using errno; ... if the caller was written by someone incompetent. ... and when a user process makes a system call, ... >> The point of defensive programming is preventing the problems you ...
- Re: The philosophy of errno
... >condition using errno. ... >What is the good programming for this? ... >set errno to the appropriate code in case of error ... compile this with gcc x.c ...
- Why does this (very simple piece of) code does not work?
... OSError: [Errno 22] Invalid argument ... TIA, ...