Re: select() on FIFOs

Alan Cox (alan@lxorguk.ukuu.org.uk)
Thu, 24 Dec 1998 15:38:06 +0000 (GMT)


> select() returns 1
> read() returns 0
>
> What is the correct solution? I can get it to work having the server

This is the correct behaviour. There is a read situation ready and thats
'EOF'. When you get a read of 0 (ie EOF) you should close that connection
and remove it from the select list. With a non blocking connection
no data ready reports -1 errno=EWOULDBLOCK, so 0 is guaranteed to be EOF

-
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/