select returns unexpected errno 514 on signal (Linus was going to fix this?)
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)
--------------------------
Quoted 8 lines · Brian Wellington
If that's the case, then how does
fprintf(stderr, "select: %s\n", strerror(errno));
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