public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Pétur Runólfsson" <peturr02@ru.is>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: RE: libstdc++/9533: Regression: Can't read from tty with ifstream
Date: Sun, 02 Mar 2003 18:26:00 -0000	[thread overview]
Message-ID: <20030302182601.20625.qmail@sources.redhat.com> (raw)

The following reply was made to PR libstdc++/9533; it has been noted by GNATS.

From: =?iso-8859-1?Q?P=E9tur_Run=F3lfsson?= <peturr02@ru.is>
To: <paolo@gcc.gnu.org>,
	<gcc-bugs@gcc.gnu.org>,
	<nobody@gcc.gnu.org>,
	=?iso-8859-1?Q?P=E9tur_Run=F3lfsson?= <peturr02@ru.is>,
	<gcc-gnats@gcc.gnu.org>
Cc:  
Subject: RE: libstdc++/9533: Regression: Can't read from tty with ifstream
Date: Sun, 2 Mar 2003 18:23:24 -0000

 >     Something is wrong, agreed, but I cannot reproduce the
 >     regression thing: for me (*), 3.2.2 asks the number but
 >     then hangs upon <newline>. Same behaviour 3.0.4.
 
 Yes, that is the same behaviour I get (with 3.2.1). However,
 mainline fails in a different manner (the program just exits).
 I believe the culprit is this code in basic_file_stdio.cc
 (__basic_file<char>::open), which is not present on the 3.2
 branch:
 
 #if defined (F_SETFL) && defined (O_NONBLOCK)
 	    // Set input to nonblocking for fifos.
 	    if (__mode & ios_base::in)
 	      fcntl(this->fd(), F_SETFL, O_NONBLOCK);
 #endif
 
 This causes fread to return 0 immediately instead of waiting
 for input, which in turn causes underflow to return eof().
 
 Also, I think this counts as a regression, since the hang
 (when compiled with 3.2.x) can be avoided by setting the
 buffer size to 1.
 
 Petur


             reply	other threads:[~2003-03-02 18:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-02 18:26 Pétur Runólfsson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-03-03 13:26 Paolo Carlini
2003-03-03 13:16 Pétur Runólfsson
2003-03-03 12:25 paolo
2003-03-03 10:46 Pétur Runólfsson
2003-03-02 18:08 paolo
2003-02-01 12:16 peturr02

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=20030302182601.20625.qmail@sources.redhat.com \
    --to=peturr02@ru.is \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).