Linux-kernel mailing list archive 1999-20,: select() fails... sometimes

# select() fails... sometimes

mgarcia@bjssoft.es
Tue, 18 May 1999 11:46:16 -0000

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Gary L. Hennigan: "Re: AHA2940UW Pro Bios problems"
- Previous message: Jason Stone: "Re: 2.3.x wish list"

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.

It always happens with stdin (zero). I've tried the following settings for stdin without success:

fcntl( 0, F_SETFL, O_NONBLOCK );
setvbuf( stdin, NULL, _IONBF, 0 );

Any ideas?

Thanks in advance.

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

- Next message: Gary L. Hennigan: "Re: AHA2940UW Pro Bios problems"
- Previous message: Jason Stone: "Re: 2.3.x wish list"