Re: [1003.1(2004)/Issue 6 0000267]: time (keyword)
Stephane Chazelas wrote: > Note that AT&T ksh and bosh revert to calling the standalone > time utility in that case so they can't be used to time > builtin/functions. Well, if you enforce to implement the old POSIX behavior, you get what the old POSIX definition says: timing is only possible for external commands. If you use the extension, you get more > Which seem to be calling the standalone "time" utility in all > implementations in my tests. > > $ mksh -c 'time -p uname | cat' > mksh: -p: inaccessible or not found Given that mksh claims to emulate ksh88 and sometimes ksh93, it could be seen as a bug. > $ zsh -c 'time -p uname | cat' > zsh:1: command not found: -p BTW: I remember that you frequently write that zsh intends to emulate the csh behavior, but csh _is_ able to get timing for builtin commands: csh % time alias 0.0u 0.0s 0:00 0% 0+0k 0+0io 0pf+0w % Jörg -- EMail:jo...@schily.net(home) Jörg Schilling D-13353 Berlin joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'
Re: [1003.1(2004)/Issue 6 0000267]: time (keyword)
2020-02-19 11:52:21 +0100, Joerg Schilling: [...] > > $ zsh -c 'time -p uname | cat' > > zsh:1: command not found: -p > > BTW: I remember that you frequently write that zsh intends to emulate the csh > behavior, but csh _is_ able to get timing for builtin commands: > > csh > % time alias > 0.0u 0.0s 0:00 0% 0+0k 0+0io 0pf+0w > % [...] Like I said, csh forks there to be able to report the usage: tcsh> alias a b tcsh> alias a b tcsh> time alias c d 0.000u 0.000s 0:00.00 0.0% 0+0k 0+0io 0pf+0w tcsh> alias a b (missing "c d" in that output as alias c d was run in a subshell). zsh does have a csh emulation mode (emulate csh), which makes it more csh-like, but there's no way it could be twisted into being a csh interpreter. That's more of a helper mode to make it more friendly to users who come from tcsh. Like ksh or bash, zsh got many features from csh. Of the three shells, it's probably the one which got the most (like it's the one which got the most features from rc, or more generally the most features). Here, when it comes to time, it got the full getrusage() from csh/BSD, it extended it by timing each pipeline component separately (very useful to spot bottlenecks). Like csh, it report *process* resource usage. Contrary to csh, it supports timing pipelines, compounds, functions (csh has no functions anyway). And like I said, contrary to csh, it doesn't implicitly add an extra fork. That would change the functionality and would not be practical given the point above. That does mean it can't report resource usages of things that are not run in a separate process. That's a sometimes annoying drawback (though some easy workaround), but that's a tradeoff. -- Stephane
Re: [1003.1(2004)/Issue 6 0000267]: time (keyword)
Robert Elz wrote, on 18 Feb 2020: > > Date:Mon, 17 Feb 2020 15:22:08 + > From:Geoff Clare > > | 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. > > That might or might not be correct, it is impossible to say now - after > all "select" was known at the time, and not standardised, my guess is > that the reserved word "time" would, at best, have been treated the same, > but we can never know for sure now. You misunderstood my point. The ksh time reserved word was well known at the time, and the POSIX.2-1992 developers believed they had written the description of the time utility in a way that allowed it. This is clear from the RATIONALE on the time utility page. What has come to light since is that there are other ways in which the behaviour of the time reserved word in ksh is not allowed by POSIX, besides those that the standard developers explicitly allowed. This is what I meant by "the discrepancy between ksh88 and POSIX.2-1992". > However I would note XRAT C.2.4 ... > > The list of unspecified reserved words is from the KornShell, > so conforming applications cannot use them in places a reserved > word would be recognized. This list contained time in early proposals, > but it was removed when the time utility was selected for the Shell > and Utilities volume of POSIX.1-2017. > > which to me suggests the exact opposite of what you believe would > have happened (someone with access to earlier copies of the standard > would need to check and see how long that text has been there, certainly > that it mentions "POSIX.1-2017" means nothing, that's just "current version"). It is clear from the RATIONALE on the time utility page that the above means that they considered making time an unspecified reserved word like select, but then decided instead to accommodate its behaviour in the description of the time utility. -- Geoff Clare The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England
[1003.1(2016)/Issue7+TC2 0001300]: clarify GLOB_MARK behavior
The following issue has been UPDATED. == https://www.austingroupbugs.net/view.php?id=1300 == Reported By:dmitry_goncharov Assigned To: == Project:1003.1(2016)/Issue7+TC2 Issue ID: 1300 Category: System Interfaces Type: Clarification Requested Severity: Editorial Priority: normal Status: Interpretation Required Name: Dmitry Goncharov Organization: User Reference: Section:glob Page Number:1109 Line Number:37544-37545 Interp Status: Approved Final Accepted Text:See https://www.austingroupbugs.net/view.php?id=1300#c4692. == Date Submitted: 2019-11-15 22:14 UTC Last Modified: 2020-02-19 17:26 UTC == Summary:clarify GLOB_MARK behavior == Relationships ID Summary -- related to 0001301 clarify glob("/", GLOB_MARK, ... == -- (0004784) ajosey (manager) - 2020-02-19 17:26 https://www.austingroupbugs.net/view.php?id=1300#c4784 -- Interpretation approved: 19 Feb 2020 Issue History Date ModifiedUsername FieldChange == 2019-11-15 22:14 dmitry_goncharovNew Issue 2019-11-15 22:14 dmitry_goncharovName => Dmitry Goncharov 2019-11-15 22:14 dmitry_goncharovSection => glob 2019-11-15 22:36 Don Cragun Relationship added duplicate of 0001301 2019-11-15 22:40 Don Cragun Note Added: 0004658 2019-11-15 22:40 Don Cragun Status New => Closed 2019-11-15 22:40 Don Cragun Resolution Open => Duplicate 2019-11-15 22:42 Don Cragun Note Edited: 0004658 2019-11-15 23:13 Don Cragun Relationship deleted 0001301 2019-11-15 23:14 Don Cragun Note Added: 0004660 2019-11-15 23:14 Don Cragun Status Closed => New 2019-11-15 23:14 Don Cragun Resolution Duplicate => Open 2019-11-15 23:16 Don Cragun Relationship added related to 0001301 2019-11-18 15:47 geoffclare Note Added: 0004661 2019-11-19 07:32 stephane Note Added: 0004662 2019-12-19 17:36 Don Cragun Note Added: 0004692 2019-12-19 17:38 Don Cragun Note Edited: 0004692 2019-12-19 17:39 Don Cragun Status New => Resolved 2019-12-19 17:39 Don Cragun Resolution Open => Accepted As Marked 2019-12-19 17:39 Don Cragun Tag Attached: issue8 2019-12-19 17:45 Don Cragun Project Online Pubs => 1003.1(2016)/Issue7+TC2 2019-12-19 17:46 Don Cragun Page Number => (page or range of pages) 2019-12-19 17:46 Don Cragun Line Number => (Line or range of lines) 2019-12-19 17:46 Don Cragun Interp Status => --- 2019-12-19 17:46 Don Cragun Final Accepted Text => See https://www.austingroupbugs.net/view.php?id=1300#c4692. 2019-12-19 18:01 Don Cragun Page Number (page or range of pages) => 1109 2019-12-19 18:01 Don Cragun Line Number (Line or range of lines) => 37544-37545 2019-12-19 18:01 Don Cragun Category Base Definitions => System Interfaces 2019-12-19 18:15 Don Cragun Note Edited: 0004692 2019-12-19 18:16 Don Cragun Interp Status--- => Pending 2019-12-19 18:16 Don Cragun Status Resolved => Interpretation Required 2019-12-20 10:06 Don Cragun Note Edited: 0004692 2020-01-07 13:37 ajosey Interp StatusPending => Proposed 2020-01-07 13:37 ajosey Note Added: 0004710 2020-02-19 17:26 ajosey Interp StatusProposed => Approved 2020-02-19 17:26 ajosey
[1003.1(2016)/Issue7+TC2 0001306]: Documented folder= behaviour contradicts implementations (of folders command)
The following issue has been UPDATED. == https://www.austingroupbugs.net/view.php?id=1306 == Reported By:steffen Assigned To: == Project:1003.1(2016)/Issue7+TC2 Issue ID: 1306 Category: Shell and Utilities Type: Enhancement Request Severity: Editorial Priority: normal Status: Interpretation Required Name: Steffen Nurpmeso Organization: User Reference: Section:Vol. 3: Shell and Utilities, mailx Page Number:2951 Line Number:97809 Interp Status: Approved Final Accepted Text:See https://www.austingroupbugs.net/view.php?id=1306#c4716. == Date Submitted: 2019-12-16 22:38 UTC Last Modified: 2020-02-19 17:27 UTC == Summary:Documented folder= behaviour contradicts implementations (of folders command) == -- (0004785) ajosey (manager) - 2020-02-19 17:27 https://www.austingroupbugs.net/view.php?id=1306#c4785 -- Interpretation approved: 19 Feb 2020 Issue History Date ModifiedUsername FieldChange == 2019-12-16 22:38 steffenNew Issue 2019-12-16 22:38 steffenName => Steffen Nurpmeso 2019-12-16 22:38 steffenSection => Vol. 3: Shell and Utilities, mailx 2019-12-16 22:38 steffenPage Number => 2951 2019-12-16 22:38 steffenLine Number => 97809 2020-01-09 17:32 Don Cragun Interp Status => --- 2020-01-09 17:32 Don Cragun Note Added: 0004716 2020-01-09 17:32 Don Cragun Status New => Interpretation Required 2020-01-09 17:32 Don Cragun Resolution Open => Accepted 2020-01-09 17:33 Don Cragun Final Accepted Text => See https://www.austingroupbugs.net/view.php?id=1306#c4716. 2020-01-09 17:33 Don Cragun Tag Attached: tc3-2008 2020-01-10 17:43 agadminInterp Status--- => Proposed 2020-01-10 17:43 agadminNote Added: 0004717 2020-02-19 17:27 ajosey Interp StatusProposed => Approved 2020-02-19 17:27 ajosey Note Added: 0004785 ==