From: Matthew E. <ma...@co...> - 2003-07-05 14:16:18
|
> Matthew Emmerton wrote: > > However, sigaction() will return a negative error code should an error > > occur. Thus, setting errno = 0 prior to calling sigaction() is unneccessary > > since the return code (not errno) is what that application should be > > checking to determine if an error has occurred. > > If you're saying "we don't need to set errno to zero", that's fine. > All I'm pointing out is that your earlier statement, "SuSv3 says > it's illegal to set errno to zero", is false. Yes. Touche. > > Small details like this are very important for some of the non-Linux porting > > that is underway for valgrind. > > Ah, are we porting valgrind to non-Posix-compliant systems > where it's illegal to set errno to zero? No, we're porting to an almost-SUSv3 compliant system (FreeBSD) where strerror/perror does not return "Success" for errno 0, since errno 0 is technically not an error and the use of strerror/perror in that situation is undefined. -- Matt Emmerton |