lkml.org 
[lkml]   [1999]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: select() fails... sometimes
Date
From
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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.052 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site