Note that if this interpretation request is approved in concept, David
Korn has agreed to help provide wording changes to make time a reserved
word in the next revision of the standard (which will presumably happen
sometime around 2013).
Cheers,
Don
>Date: Tue, 01 Jul 2008 21:56:25 +0100 (BST)
>Resent-from: austin-review-l@opengroup.org
>From: don.cragun@sun.com
>Resent-message-id: <kFXqoD.A.dWG.8npaIB@mailman>
>X-Mailing-List: austin-review-l:archive/latest/2584
>
> Defect report from : Don Cragun , Sun Microsystems, Inc
>
>(Please direct followup comments direct to austin-group-l@opengroup.org)
>
>@ page 916-919 line 35505-35633 section time objection {dwc: time(keyword)}
>
>Problem:
>
>Edition of Specification (Year): 2004
>
>Defect code : 3. Clarification required
>
>The rationale on XCU P918, L35624-35630 notes that time is a
>reserved word in ksh and says that the POSIX definition of time
>is intended to allow time to be implemented as a stand-alone
>utility or as a reserved word in the shell. Furthermore, the
>normative text on P916, L35522-35527 make the behavior of time
>unspecified when the utility operand is a pipeline.
>
>But, when time is a keyword, output redirection does not behave
>as specified by the standard. In particular, the command:
> time utility 2> timeout
>is required by the standard to write the timing statistics from
>invoking utility in a file named timeout. However, in ksh88,
>ksh93, bash, and zsh the file timeout will be empty unless the
>invocation of utility writes data to stderr. The stderr from
>the time command itself in these shells will be sent to stderr
>of the shell itself; not to the stderr output of the utility
>being timed.
>
>Furthermore, the standard behavior of time would be
>significantly improved (allowing timing of pipelines and timing
>of compound commands (e.g., for, while, and until loops; case
>statements; if statements) as well as timing individual invoked
>utilities if the standard really made time a reserved word.
>
>Since the rationale says that the intent is that time can be a
>shell reserved word, but the stderr section of the description
>doesn't allow time to be treated as a reserved word, I request
>a formal interpretation allowing implementation that have made
>time a reserved word to conform even though they do not perform
>stderr redirections as described by the current standard.
>
>Action:
>
>Issue an interpretation saying the standard is ambiguous on
>this issue, thereby allowing time to be a stand-alone utility
>or a reserved word.
>
>In the next revision of the standard make time a reserved word.
>
|