[lkml]   [2001]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: accept
On Sun, 4 Feb 2001, Mathieu Dube wrote:

> Ok, but fd 0 cant be a valid socket since its the stdin
Sure it can:

fd = socket(....);
dup....etc, for stdout and stderr.

That said, never, never, ever, check the value of the errno global
unless a function call returned an error. Many/most/all C runtime
procedures don't touch that variable unless an error occurred.
So, reading its value will show the results of something that
happened hours ago (line an interrupted system call).

> 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

Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:56    [W:0.056 / U:1.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site