Your code is broken, and for exactly the same reason I told you
yesterday.
> default: /* partial read */
> switch(errno) {
> case EINTR: /* interrupted by signal */
> case EAGAIN: /* O_NONBLOCK ? */
> retval += tmpret;
> break;
I repeat: Checking errno when read() has returned something other than
-1 is ILLEGAL. Period. This check is triggering early, thus giving your
supposed early EOF.
This is not even remotely a kernel issue.
--Adam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/