Re: select() bug

Paul Marquis
2000-11-02T22:54:18Z

I guess in theory, you're right, though if a write() could succeed,
shouldn't select() say that it would?

And this assumes you're calling select() with a timeout. In Apache,
the caretaker process wakes up periodically and polls the pipe with a
timeout of zero. If it gets back the pipe is not writable, it kills
the process. With this false negative situation, this is a bad thing.

Alan Cox wrote:
>
> > that are log file handlers are dead. If select() reports it can't
> > write immediately, Apache terminates and restarts the child process,
> > creating unnecessary load on the system.
>
> Is there anything saying that select has to report ready the instant a byte
> would fit. Certainly its better for performance to reduce the context switch
> rate by encouraging blocking

--
Paul Marquis
pmarquis@iname.com

If it's tourist season, why can't we shoot them?