Le jeudi 30 juillet 2009, Timo Sirainen a écrit : > > What the hell were POSIX people thinking?? This is the first syscall > > I've seen that behaves like this, and apparently without any good > > reason! Wonder how many other new system calls there are like this, that > > I haven't noticed yet.. > > Looks like all posix_*() syscalls do that. Wonder if there are more.
Looks like too many people were incorrectly using errno, especially in multi- threaded context. From http://www.unix.org/whitepapers/reentrant.html : "In addition, all POSIX.1c functions avoid using errno and, instead, return the error number directly as the function return value, with a return value of zero indicating that no error was detected. This strategy is, in fact, being followed on a POSIX-wide basis for all new functions. "
