Re: utilities and write errors

2021-06-28 Thread Geoff Clare via austin-group-l at The Open Group
Robert Elz wrote, on 28 Jun 2021: > > Date:Mon, 28 Jun 2021 10:03:39 +0100 > From:"Geoff Clare via austin-group-l at The Open Group" > > Message-ID: <20210628090339.GA13976@localhost> > > | The (builtin) pwd utility got an error when it tried to write() to > |

Re: utilities and write errors

2021-06-28 Thread Robert Elz via austin-group-l at The Open Group
Date:Mon, 28 Jun 2021 10:03:39 +0100 From:"Geoff Clare via austin-group-l at The Open Group" Message-ID: <20210628090339.GA13976@localhost> | The (builtin) pwd utility got an error when it tried to write() to | standard output. But did it "encounter" the error?

Re: utilities and write errors

2021-06-28 Thread Stephane Chazelas via austin-group-l at The Open Group
2021-06-28 17:28:04 +0700, Robert Elz via austin-group-l at The Open Group: [...] > A more blatant case would be > > pwd | (exit 0) [...] On the zsh mailing list, where the issue was initially brought up by Vincent, there was also the mention that EBADF error was explicitly ignore as a

Re: utilities and write errors

2021-06-28 Thread Robert Elz via austin-group-l at The Open Group
Date:Mon, 28 Jun 2021 13:26:48 +0200 From:"Joerg Schilling via austin-group-l at The Open Group" Message-ID: <20210628112648.qkgag%sch...@schily.net> Several messages to which to reply ... but I'll start with the easy ones. | It could be argued that setting up

Re: utilities and write errors

2021-06-28 Thread Geoff Clare via austin-group-l at The Open Group
tg...@mirbsd.org wrote, on 27 Jun 2021: > > Don Cragun via austin-group-l at The Open Group dixit: > > > • When an unrecoverable error condition is > > encountered, the utility shall exit with a > > non-zero exit status. > > Is “pwd >/dev/full” an “unrecoverable error condition”

Re: utilities and write errors

2021-06-28 Thread Stephane Chazelas via austin-group-l at The Open Group
2021-06-28 12:06:34 +0100, Geoff Clare via austin-group-l at The Open Group: [...] > > It has been tradition, for a very long time, for writes on stdout to > > have errors ignored - particularly in a case like this, where because > > of the redirection, stdout is probably buffered, and not a lot

Re: utilities and write errors

2021-06-28 Thread Robert Elz via austin-group-l at The Open Group
Date:Mon, 28 Jun 2021 15:48:33 +0200 From:Vincent Lefevre Message-ID: <20210628134833.ga46...@zira.vinc17.org> | So, if writing to a closed fd yields unspecified behaviour, what | does "refers to no open file" mean? No, you misunderstood. It isn't writing to

[Issue 8 drafts 0001486]: Are parentheticals normative or informative?

2021-06-28 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
The following issue has been SUBMITTED. == https://www.austingroupbugs.net/view.php?id=1486 == Reported By:rhansen Assigned To:

Re: utilities and write errors

2021-06-28 Thread Vincent Lefevre via austin-group-l at The Open Group
On 2021-06-28 20:01:03 +0700, Robert Elz via austin-group-l at The Open Group wrote: > if a utility is invoked with any of stdin/out/err closed then what happens > is very explicitly unspecified in POSIX. My guess is that that is largely > because if the utility then opens a file it will be

Re: utilities and write errors

2021-06-28 Thread Joerg Schilling via austin-group-l at The Open Group
"Robert Elz via austin-group-l at The Open Group" wrote: > Date:Mon, 28 Jun 2021 10:03:39 +0100 > From:"Geoff Clare via austin-group-l at The Open Group" > > Message-ID: <20210628090339.GA13976@localhost> > > | The (builtin) pwd utility got an error when it

Re: utilities and write errors

2021-06-28 Thread Stephane Chazelas via austin-group-l at The Open Group
2021-06-28 20:01:03 +0700, Robert Elz: [...] > steph...@chazelas.org said: > | On the zsh mailing list, where the issue was initially brought up by > | Vincent, there was also the mention that EBADF error was explicitly > | ignore as a special case, as some systems have or used to have > |

Re: utilities and write errors

2021-06-28 Thread Vincent Lefevre via austin-group-l at The Open Group
On 2021-06-28 22:02:22 +, tg...@mirbsd.org via austin-group-l at The Open Group wrote: > What’s currently left of Vincent’s issue is that the utility tries > to write to its stdout¹ which the shell has connected to something > that does not accept writes: /dev/full on systems that have it, an

Re: utilities and write errors

2021-06-28 Thread tg...@mirbsd.org via austin-group-l at The Open Group
Stephane Chazelas via austin-group-l at The Open Group dixit: >2021-06-28 20:01:03 +0700, Robert Elz: >[...] I see significant support here for my interpretation of this. And I’d probably even be annoyed if it shows strerror(EPIPE)… But… >> | so users were using >&- instead to silence

Re: utilities and write errors

2021-06-28 Thread Vincent Lefevre via austin-group-l at The Open Group
On 2021-06-28 21:28:37 +0700, Robert Elz wrote: > Date:Mon, 28 Jun 2021 15:48:33 +0200 > From:Vincent Lefevre > Message-ID: <20210628134833.ga46...@zira.vinc17.org> > > | So, if writing to a closed fd yields unspecified behaviour, what > | does "refers to no open

Re: utilities and write errors

2021-06-28 Thread Vincent Lefevre via austin-group-l at The Open Group
I forgot another useful case with write error checking. For instance, I expect the following command to terminate, which is not the case with ksh: ( trap '' PIPE; while pwd; do :; done; ) | head Worse, with ksh93, when I hit Ctrl-C to interrupt this command, a ksh93 process is still running,

Re: utilities and write errors

2021-06-28 Thread Philip Guenther via austin-group-l at The Open Group
On Mon, Jun 28, 2021 at 2:53 PM Vincent Lefevre via austin-group-l at The Open Group wrote: > On 2021-06-28 21:28:37 +0700, Robert Elz wrote: > > Date:Mon, 28 Jun 2021 15:48:33 +0200 > > From:Vincent Lefevre > > Message-ID: <20210628134833.ga46...@zira.vinc17.org> >