All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Roeland <marco.roeland@xs4all.nl>
To: Ben Greear <greearb@candelatech.com>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>
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: <3F21C93D.6000005@candelatech.com>

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 with select? 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:
  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=20030726090523.GA25539@localhost \
    --to=marco.roeland@xs4all.nl \
    --cc=greearb@candelatech.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.