Austin Group Defect Tracker

Aardvark Mark IV

Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001511 [Issue 8 drafts] Shell and Utilities Editorial Enhancement Request 2021-08-11 16:51 2022-01-11 11:35
Reporter kre View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Applied   Product Version Draft 2
Name Robert Elz
User Reference
Section XCU 2.5.3
Page Number 2315
Line Number 74583-9
Final Accepted Text Note: 0005438
Summary 0001511: LINENO description claims to be a User Portability Utilities option var, but has no margin tag or shading
Description The description of the variable LINENO in XCU 2.5.3 concludes with
the sentence:

   This volume of POSIX.1-202x specifies the effects of the variable only
   for systems supporting the User Portability Utilities option.

(lines 74587-9)

but there is no shading, nor a UP margin tag, unlike, for example the
description of PS1 just below (lines 74598 and following) and others.

If anyone feels the need, the description of what LINENO actually does or
how it works is singularly useless, for example, it says (paraphrasing)
"counts lines from 1 within a script or function" which is fine except when
the function is in a script, and it isn't clear if LINENO starts from 1
inside the function, or continues counting from 1 in the script. Nor is
it clear when the "current sequentlial line number" is determined exactly
for example if the script contains (with the echo word being on line 1)

    echo ${LINENO} \
    printf done

One could say that when the echo command is executed, the current sequential
line number is 3, as the shell has read past the \n at the end of the
continuation line of the echo command (but not yet parsed the printf command),
it must have done to know that the echo command has finished, which it needs
to know before it can be executed. But is printing 3 twice useful? And does
any shell actually do that? If not that, should it print 1, or 2 (twice)
or both 1 and 2 (once each) (which is what the NetBSD shell does, where
$LINENO gives the line number on which it appears, and it is very precisely
spefified just what that is for all of the weird cases - including when
LINENO has been exported).

But all of this is a giant can of worms, definitely not just editorial,
and not really part of this report (just documented here for posterity).
Desired Action Not sure what the correct way to deal with this one is (nor how to specify
what should be done) - that is, it isn't clear if the intent is that LINENO
not be specified as existing at all if UP isn't included, or that it is
intended to exist, but it just isn't specified how it behaves in that case.
Tags tc3-2008
Attached Files

- Relationships
related to 0001006Applied 1003.1(2013)/Issue7+TC1 PS1 should be subject to command substitution and arithmetic expansion 

-  Notes
geoffclare (manager)
2021-08-12 09:30

In Issue 7 (C181) the effect of UP on PS1/2/4 is described the same way as for LINENO. It was changed in the Issue 8 drafts as part of the overhaul of PS1/2/4 in bug 0001006.

Therefore I think LINENO should be updated the same way, and since bug 1006 was tagged tc3-2008 so should this bug.

On 2018 edition page 2352 line 74935 section 2.5.3, add a new first paragraph:
[UP]The processing of the LINENO shell variable shall be supported if the system supports the User Portability Utilities option.[/UP]

On 2018 edition page 2352 line 74939 section 2.5.3, delete:

This volume of POSIX.1-2017 specifies the effects of the variable only for systems supporting the User Portability Utilities option.

- Issue History
Date Modified Username Field Change
2021-08-11 16:51 kre New Issue
2021-08-11 16:51 kre Name => Robert Elz
2021-08-11 16:51 kre Section => XCU 2.5.3
2021-08-11 16:51 kre Page Number => 2315
2021-08-11 16:51 kre Line Number => 74583-9
2021-08-12 09:30 geoffclare Note Added: 0005438
2021-08-12 09:32 geoffclare Relationship added related to 0001006
2021-12-16 16:07 geoffclare Final Accepted Text => Note: 0005438
2021-12-16 16:07 geoffclare Status New => Resolved
2021-12-16 16:07 geoffclare Resolution Open => Accepted As Marked
2021-12-16 16:07 geoffclare Tag Attached: tc3-2008
2022-01-11 11:35 geoffclare Status Resolved => Applied

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker