On Mon, Jun 18, 2001 at 11:05:34PM +0200, Claudio Nieder allegedly wrote:
> On Solaris the above code would work without flaws.
>
> > whereas SunOS 4.1.4 (my usual 'old bsd system' benchmark) says:
> > descriptor sets. 0 indicates that the time limit referred
> > to by timeout expired. On failure, select() returns -1,
> > sets errno to indicate the error, and the descriptor sets
> > are not changed.
>
> It doesn't tell explicitly what it does when it returns 0, but as
> it's mentioned only in the error case, that the bits are not cleared,
> one supposes that in timeout situations they are cleared, and thus
> qmail will not have any problems.
Same with FreeBSD 4.3 - by implication.
... On return, select() replaces the given descriptor sets with
subsets consisting of those descriptors that are ready for the
requested operation.
...
RETURN VALUES
... If select() returns with an error, including one due to an
interrupted call, the descriptor sets will be unmodified.
For this who are having significant recurrences of this problem, are
you in a position to change timeoutread.c to check for a zero return
from select? It sure would help isolate this problem if you can.
Regards.