From: "Johan Adolfsson" <johan.adolfsson@axis.com>
To: <linux-kernel@vger.kernel.org>
Cc: "Johan Adolfsson" <johan.adolfsson@axis.com>
Subject: select()/accept() problem in 2.0.38
Date: Mon, 12 Mar 2001 14:11:06 +0100 [thread overview]
Message-ID: <051e01c0aaf5$e5b5a4d0$0a070d0a@axis.se> (raw)
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
reply other threads:[~2001-03-12 13:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='051e01c0aaf5$e5b5a4d0$0a070d0a@axis.se' \
--to=johan.adolfsson@axis.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®