From: Alistair John Strachan <s0348365@sms.ed.ac.uk>
To: "Lluís Batlle" <viriketo@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: bug in select() in linux
Date: Mon, 12 Mar 2007 15:08:52 +0000 [thread overview]
Message-ID: <200703121508.52749.s0348365@sms.ed.ac.uk> (raw)
In-Reply-To: <45219fb00703120802y78cf4dbds6e89b58de9d0f801@mail.gmail.com>
On Monday 12 March 2007 15:02, Lluís Batlle wrote:
> Oh, of course you're right. I was inside too much layers to think of
> the tcp protocol, and I did not pay attention to it.
>
> Maybe something could be added to the manpage anyway.
>
> The bad thing is that there's no way I can use a socket for writing
> using select() if that connection has been half-closed by the other
> end. Moo.
This question comes up from time to time. I think the answer is
ultimately "select() sucks, use poll()".
I can't exactly remember the details, but I believe POLLHUP or POLLOUT as
flags do what you want.
--
Cheers,
Alistair.
Final year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
next prev parent reply other threads:[~2007-03-12 15:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-12 14:51 Lluís Batlle
[not found] ` <20070312160104.25d6b321@lxorguk.ukuu.org.uk>
2007-03-12 15:02 ` Lluís Batlle
2007-03-12 15:08 ` Alistair John Strachan [this message]
2007-03-12 15:15 ` Lluís Batlle
2007-03-12 17:03 ` Alan Cox
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=200703121508.52749.s0348365@sms.ed.ac.uk \
--to=s0348365@sms.ed.ac.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=viriketo@gmail.com \
/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®