select returns unexpected errno 514 on signal (Linus was going to fix this?)

From: Andrew Walrond
Date: Wed Apr 14 2004 - 11:11:59 EST


When debugging (with gdb) a usermode program which receives a signal during
select(), select returns -1 and sets errno to 514, rather than the expected
EINTR.

Googling finds this reply from Linus to a similar thread a couple years ago,
which seems to suggest a patch was to be applied. If so, it hasn't been (this
machine is running 2.6.3)

--------------------------
On Thu, 15 Aug 2002, Brian Wellington wrote:
>
> If that's the case, then how does
> fprintf(stderr, "select: %s\n", strerror(errno));
> print
> select: Unknown error 514
> ?
>
> That's the traced process printing the error, not the tracing process.

Ahh, dang, there's a patch floating around for this case. Basically,
tracing interferes with the normal behaviour (ie you _shouldn't_ see this
normally, only when tracing system calls).

linus
-------------------------

Andrew Walrond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/