public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "michael dot kerrisk at gmx dot net" <sourceware-bugzilla@sources.redhat.com>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/682] stdout and file descriptor mismatch after a freopen()
Date: Thu, 16 Jun 2005 15:50:00 -0000	[thread overview]
Message-ID: <20050616155018.17131.qmail@sourceware.org> (raw)
In-Reply-To: <20050119161710.682.vincent+libc@vinc17.org>


------- Additional Comments From michael dot kerrisk at gmx dot net  2005-06-16 15:50 -------
(In reply to comment #4)
> However the current behavior violates the ISO C standard (or the system
> documentation is incorrect).

Which part of the standard do you believe this violates?
SUSv3 permits the Linux behaviour, as far as I can see.
And I believe it is common on other implementations also.

> But the solution to reserve the fd 0, 1 and 2 for stdin, stdout and stderr in
> ISO C programs (as long as a race condition doesn't occur) would be OK. Note
> that a C implementation isn't required to have fully reentrant standard
> functions, so that if the programmer wants stdin, stdout and stderr to really
> correspond to the standard streams, then he should also make sure that no race
> condition occurs.

I do not believe any change should be made.  See
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295859
for further information.

Cheers,

Michael

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=682

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


  parent reply	other threads:[~2005-06-16 15:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-19 16:18 [Bug libc/682] New: " vincent+libc at vinc17 dot org
2005-02-14 15:47 ` [Bug libc/682] " gotom at debian dot or dot jp
2005-02-14 17:30 ` vincent+libc at vinc17 dot org
2005-02-14 17:36 ` jakub at redhat dot com
2005-02-15  0:13 ` vincent+libc at vinc17 dot org
2005-06-16 15:50 ` michael dot kerrisk at gmx dot net [this message]
2005-06-16 21:12 ` vincent+libc at vinc17 dot org
2009-10-29 17:58 ` vincent+libc at vinc17 dot org
     [not found] <bug-682-131@http.sourceware.org/bugzilla/>
2014-02-16 19:30 ` jackie.rosen at hushmail dot com
2014-05-28 19:43 ` schwab at sourceware dot org

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=20050616155018.17131.qmail@sourceware.org \
    --to=sourceware-bugzilla@sources.redhat.com \
    --cc=glibc-bugs@sources.redhat.com \
    /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).