Re: FIFOs select: what about our implementation?

2000-09-06 Thread Bruce Evans
On Wed, 6 Sep 2000, Andrey A. Chernov wrote: Please consider that we talk not about reads but about select. 'Select' is used to indicate that data is available while 'read' used to read it, they No, select on a read descriptor returns successfully when the descriptor is "ready" to read,

FIFOs select: what about our implementation?

2000-09-05 Thread Andrey A. Chernov
Consider this comment comes from screen(1): /* * Define this if your system exits select() immediatly if a pipe is * opened read-only and no writer has opened it. */ #define BROKEN_PIPE 1 We have broken(?) pipe, according to this statement. At least, we have select return code -1 with wrong

Re: FIFOs select: what about our implementation?

2000-09-05 Thread Peter van Dijk
On Tue, Sep 05, 2000 at 07:50:56PM +0400, Andrey A. Chernov wrote: Consider this comment comes from screen(1): /* * Define this if your system exits select() immediatly if a pipe is * opened read-only and no writer has opened it. */ #define BROKEN_PIPE 1 We have broken(?) pipe,

Re: FIFOs select: what about our implementation?

2000-09-05 Thread Andrey A. Chernov
On Tue, Sep 05, 2000 at 07:24:58PM +0200, Peter van Dijk wrote: select return code -1 with wrong errno == 0. Sorry, I was wrong about errno, it returns that descriptor is ready for read while there is nothing to read. I surely do think this behaviour is broken.

Re: FIFOs select: what about our implementation?

2000-09-05 Thread Andrey A. Chernov
On Wed, Sep 06, 2000 at 07:35:50AM +1100, Bruce Evans wrote: This behaviour is sort of intentional. Reads on a named pipe with no writers are specified by POSIX.1 to return immediately. 4.4BSD does extra work to break this in some cases. select() on a read descriptor open on such a pipe

Re: FIFOs select: what about our implementation?

2000-09-05 Thread Peter van Dijk
On Wed, Sep 06, 2000 at 12:44:33AM +0400, Andrey A. Chernov wrote: [snip] Please consider that we talk not about reads but about select. 'Select' is used to indicate that data is available while 'read' used to read it, they are two different things and behaviour of one thing not related to