RE: accept

From: David Schwartz (davids@webmaster.com)
Date: Sun Feb 04 2001 - 19:14:52 EST


> Ok, but fd 0 cant be a valid socket since its the stdin

        Wrong. fd 0 can be a valid socket. Read the man page to 'accept' again.
Remember again that zero is a non-negative integer.

> I posted that on this mailing list coz I thought that this might
> be a scaling
> problem since it happens when theres already several clients
> connected to the
> server

        If your code called 'perror' in response to getting a zero from 'accept',
your code is broken.

        DS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 07 2001 - 21:00:20 EST