[lkml]   [1999]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: select() fails... sometimes
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
has some kind of error (connection closed, etc).

Anyway I'll reset errno... it's better to prevent. :-)

Thanks again!

-----Original Message-----
From: Kurt Garloff []
Sent: 20 May 1999 18:05
Subject: Re: select() fails... sometimes

On Tue, May 18, 1999 at 11:46:16AM -0000, wrote:
> I have a problem using select() on several handles.
> It does work fine but, under some circumstances, it returns inmediately
> ignoring the timeout argument, indicating that handle zero (stdin linked
> to a socket via inetd) has something to read, but "read()" gets nothing at
> all.
> Once it happens it doesn't stop until something is received by some other
> handle. It's very annoying since the CPU load grows enormeously.

I once had a similar problem, but IIRC, it was caused by a buggy libc5.
It was worked around by explicitly setting errno to zero, before calling
select ().

Just an idea ...
Kurt Garloff <> SuSE GmbH, Nürnberg, FRG
Linux kernel development; SCSI driver: DC390 (tmscsim/AM53C974)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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