* select()/accept() problem in 2.0.38
@ 2001-03-12 13:11 Johan Adolfsson
0 siblings, 0 replies; only message in thread
From: Johan Adolfsson @ 2001-03-12 13:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Johan Adolfsson
In short:
My listener socket _sometimes_ gets confused when a client
connect and closes very fast when the server has outstanding data.
The read fd_set with the listener socket is not set
by the select() call for new connections,
but if I do accept() on it anyway I will get the new socket!
I know this could happen anyway but if I don't do the accept()
the fd_set will not be set and the application will not handle
any new connections.
New clients will think they are connected depending on the
backlog parameter to listen(), and then they will timeout.
More details:
I use non-blocking sockets.
The select() has a timeout of 20ms since I need to
poll the serial port status pins.
I don't get this on 2.4.
When it happens I get a EPIPE from write(),
(sometimes it works but then I usually get ECONNRESET instead
of EPIPE but not always)
It seems to be timing dependent.
Any ideas?
/Johan
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-03-12 13:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-12 13:11 select()/accept() problem in 2.0.38 Johan Adolfsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®