Robert Elz <k...@munnari.oz.au> wrote, on 17 Feb 2020:
>
>     Date:        Mon, 17 Feb 2020 09:52:52 +0000
>     From:        Geoff Clare <g...@opengroup.org>
> 
>   | We can't just reject issue 267.  There are certified systems that
>   | do not behave as the standard requires (probably all of them).
>   | We need a formal interpretation saying that there is a defect in
>   | the standard in order for those systems not to have to remove the
>   | time keyword from their "sh" shells.  Once we say that there is a
>   | defect in the standard, we have to fix it.
> 
> Let me interpret that, and see if I understand correctly.
> 
> You plan on changing the rules for shells that implemented the
> standard (in this area) as it is written, in order to allow systems
> that were incorrectly certified to become correctly certified without
> needing to change anything.

Not at all.  If the discrepancy between ksh88 and POSIX.2-1992 had
come to light before those systems were certified, the standard would
have been amended to allow the ksh88 behaviour at that time.  The end
result would be the same, just the timing would be different.

>   | So what I would suggest is that for bug 267 we continue with the
>   | addition of a minimal set of changes to add the time keyword in
>   | a way that is compatible with posixified-ksh88 and bash.
> 
> If something absolutely has to be done with time, then make it
> a reserved reserved word, just like select and [[ (etc), and then
> specify that use of the time utility (specified as unquoted "time")
> in any way other than with a simple command produces unspecified results.

Treating time something like select and [[ would be an alternative way
around the problem.  What you suggest for "use of the time utility" is
not quite right, though.  Use of the time _reserved_word_ should be as
you say - unspecified unless it prefixes a simple command.  Use of the
time _utility_ can stay specified the same as now.  For example:

"time" command1 2>&1 | command2

is a use of the time utility to time the execution of command1, with
its stdout and stderr, and the timing information, all being fed into
command2. Quoting "time" means it is not recognized as a reserved word.

-- 
Geoff Clare <g.cl...@opengroup.org>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

Reply via email to