mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lluís Batlle" <viriketo@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: bug in select() in linux
Date: Mon, 12 Mar 2007 16:15:15 +0100	[thread overview]
Message-ID: <45219fb00703120815l79262977va0b7e3b8e59921de@mail.gmail.com> (raw)
In-Reply-To: <200703121508.52749.s0348365@sms.ed.ac.uk>

Wouldn't it be better for all of us that select() doesn't block on
write(), unless there is a socket writting buffer fulfilled? It will
be consistent with the select() specification.

2007/3/12, Alistair John Strachan <s0348365@sms.ed.ac.uk>:
> 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.
>

  reply	other threads:[~2007-03-12 15:15 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
2007-03-12 15:15       ` Lluís Batlle [this message]
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=45219fb00703120815l79262977va0b7e3b8e59921de@mail.gmail.com \
    --to=viriketo@gmail.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®