Valgrind wish
What's wrong with this code?
while ((connect(fd, sa, salen) == -1) && errno == EINTR) ;
if (errno && errno != EINPROGRESS) {
I wish Valgrind had an option to mark errno as undefined on entry to a system call, so that it's only valid to check it if the system call fails and sets errno. (I realize that strictly it ought to be carried over from the previous value if the syscall is correct, but code that relies on this may be broken.)
posted Fri 12 Nov 2004 in /software/valgrind | link
Archives 2008: Apr Feb 2007: Jul May Feb Jan 2006: Dec Nov Oct Sep Aug Jul Jun Jan 2005: Sep Aug Jul Jun May Apr Mar Feb Jan 2004: Dec Nov Oct Sep Aug Jul Jun May Apr Mar Feb Jan 2003: Dec Nov Oct Sep Aug Jul Jun May
Copyright (C) 1999-2007 Martin Pool.