From: "M. Tavasti" <tawz@nic.fi>
To: Ketil Froyn <ketil@froyn.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: Select with device and stdin not working
Date: 25 Jul 2001 16:35:05 +0300 [thread overview]
Message-ID: <m2snflm8s6.fsf@akvavitix.vuovasti.com> (raw)
In-Reply-To: <Pine.LNX.4.30.0107251550370.20050-100000@pccn3.uio.no>
In-Reply-To: Ketil Froyn's message of "Wed, 25 Jul 2001 15:53:34 +0200 (CEST)"
Ketil Froyn <ketil@froyn.com> writes:
> > while(1) {
> > FD_ZERO(&rfds);
> > FD_SET(fd,&rfds);
> > FD_SET(fileno(stdin),&rfds);
> > if( select(fd+1, &rfds, NULL, NULL, NULL ) > 0) {
(Lines removed)
> > }
>
> It looks like you are sending the original fd_set to select. Remember that
> it is modified in place.
But one would at least expect FD_ZERO() to really clean up rfds, and
after it FD_SET() is used again, for every call of select(). And this
code works fine in 2.0 kernels, and also with 2.2 and 2.4 if I'm using
named pipe and stdin. Therefore I have strong belief problem is not
usage of select() but something else.
--
M. Tavasti / tawz@nic.fi / +358-40-5078254
next prev parent reply other threads:[~2001-07-25 13:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-25 12:17 M. Tavasti
2001-07-25 13:53 ` Ketil Froyn
2001-07-25 13:35 ` M. Tavasti [this message]
2001-07-25 14:54 ` Ketil Froyn
2001-07-25 15:02 ` Ben Greear
2001-07-25 15:07 ` Richard B. Johnson
2001-07-25 15:27 ` M. Tavasti
2001-07-25 15:45 ` Richard B. Johnson
2001-07-26 12:06 ` M. Tavasti
2001-07-26 13:20 ` M. Tavasti
2001-07-25 14:14 Stephen Landamore
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=m2snflm8s6.fsf@akvavitix.vuovasti.com \
--to=tawz@nic.fi \
--cc=ketil@froyn.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®