ERESTARTNOHAND - what to do?
2.6 kernel's include/linux/errno.h defines several error codes that "should never be seen by user programs." But, for example, select(2) apparently returns ERESTARTNOHAND (514), one of the listed error codes, which appears identical to or very similar to EINTR.
What is an application supposed to do when it encounters this error code? It's a piece of cake to check errno against "514," but ERESTARTNOHAND is not defined in the user space (/usr/include/errno.h). Does the wording "should not be seen by user _programs_" mean the error codes should be absorbed by the library layer so that they are not see by "programs"?
As to the particular error code ERESTARTNOHAND, the comments in fs/select.c are very vague and do not make sense. Should I patch the kernel to convert ERESTARTNOHAND to EINTR? (I have seen several local patches that do so.)
My client is in trouble with this and I am assigned to solve it.