Re: select() fails... sometimes

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Sat, 22 May 1999 22:19:52 +0200 (MEST)


Miguel Angel García Grande wrote:
> Thank you very much, Kurt.
>
> The reason seems to be a feature I didn't know: If select() indicates you
> can read from a handle but read() really gets nothing, it means the handle
^^^^^^^^^^^^^^^^^ returns zero
> has some kind of error (connection closed, etc).
^^^^^^^^ NO!

returning 0 is completely different from "error". It is the standard
"end of file" indication.

You should also note that errno is not modified in that case.

Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------

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