archive mirror
 help / color / mirror / Atom feed
From: Marco Roeland <>
To: Ben Greear <>
Cc: Linux Kernel Development <>
Subject: Re: Repost: Bug with select?
Date: Sat, 26 Jul 2003 11:05:23 +0200	[thread overview]
Message-ID: <20030726090523.GA25539@localhost> (raw)
In-Reply-To: <>

On Friday July 25th 2003 at 17:20 uur Ben Greear wrote:

> I thought select is supposed to tell you when you can read/write at least
> something without failing. Otherwise it would be worthless when doing
> non-blocking IO because you can both read and write w/out blocking at all
> times. If you run similar code on a tcp socket instead of std-out, do you see
> the same busy spin? (To do it right, make sure the network between source and
> destination is slower than the CPU can handle, ie 10bt hub.)

My 'analysis' was indeed based on experience with sockets, where you
don't get the busy spin. It's indeed a bit baffling why select keeps
insisting that fd 1 is writable. A quick test on kernel versions
2.2.12-20, 2.4.20 and 2.6.0-test1 all give the same results, so I
suppose select itself is doing it's expected duty, and that in that case
the special underlying mechanics of stdout require special mechanics to
find out if it's blocked?! Beats me, but that's pretty easy... ;-)
Marco Roeland

  reply	other threads:[~2003-07-26  8:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-18  8:49 Problem " Eli Barzilay
2003-07-24  5:28 ` Repost: Bug " Eli Barzilay
2003-07-25 13:41   ` Marco Roeland
2003-07-26  0:20     ` Ben Greear
2003-07-26  9:05       ` Marco Roeland [this message]
2003-07-26  0:35   ` Philippe Troin
2003-07-26 14:29     ` Eli Barzilay
2003-07-26 14:25   ` Eli Barzilay
2003-07-26 15:37     ` Marco Roeland
2003-07-27 19:29 Manfred Spraul

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030726090523.GA25539@localhost \ \ \ \
    --subject='Re: Repost: Bug with select?' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).