From: Joseph Myers <joseph@codesourcery.com>
To: "Arsen Arsenović" <arsen@aarsen.me>
Cc: <libc-alpha@sourceware.org>
Subject: Re: [PATCH v2] Ensure standard file descriptors are open on start
Date: Wed, 19 Aug 2020 22:32:36 +0000 [thread overview]
Message-ID: <alpine.DEB.2.21.2008192230270.32578@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20200819194025.5sgyd5avhduime4q@bstg>
On Wed, 19 Aug 2020, Arsen Arsenović via Libc-alpha wrote:
> > Please give specific references, not just "as required by POSIX and C".
> > What exactly do you think requires these descriptors to be open?
> The sections that lead me to believe this were:
> http://www.iso-9899.info/n1570.html#7.21.3p7
> https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_05
Those appear to be specifically about the stdio streams, not the file
descriptors. I think a stream that returns an EBADF error for all
operations would be perfectly valid for the purposes of those
requirements.
> This specific part of the quote would seem to imply that standard input, output
> and error must be opened for reading and writing respectively?
Yes - that is, what the implementation does if standard input is not open
for reading, or standard output and error are not open for writing, is not
specified.
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2020-08-19 22:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 12:41 Arsen Arsenović
2020-08-19 16:28 ` Joseph Myers
2020-08-19 17:46 ` Zack Weinberg
2020-08-19 17:50 ` Joseph Myers
2020-08-19 18:20 ` Adhemerval Zanella
2020-08-19 19:13 ` Florian Weimer
2020-08-19 19:25 ` Adhemerval Zanella
2020-08-19 19:27 ` Florian Weimer
2020-08-19 19:35 ` Adhemerval Zanella
2020-08-19 19:40 ` Arsen Arsenović
2020-08-19 21:04 ` Michael Morrell
2020-08-19 22:32 ` Joseph Myers [this message]
2020-08-19 23:45 ` Arsen Arsenović
2020-08-20 22:00 ` Paul Eggert
2020-08-20 23:25 ` Arsen Arsenović
2020-08-27 15:56 ` Zack Weinberg
2020-08-27 18:21 ` Paul Eggert
2020-08-28 0:12 ` Arsen Arsenović
2020-09-04 17:49 ` Arsen Arsenović
2020-09-11 7:47 ` ping^2 " Arsen Arsenović
2020-08-19 23:16 ` Rich Felker
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=alpine.DEB.2.21.2008192230270.32578@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=arsen@aarsen.me \
--cc=libc-alpha@sourceware.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).