The following issue has been SUBMITTED. 
====================================================================== 
https://www.austingroupbugs.net/view.php?id=1806 
====================================================================== 
Reported By:                calestyo
Assigned To:                
====================================================================== 
Project:                    Issue 8 drafts
Issue ID:                   1806
Category:                   Shell and Utilities
Type:                       Clarification Requested
Severity:                   Editorial
Priority:                   normal
Status:                     New
Name:                       Christoph Anton Mitterer 
Organization:                
User Reference:              
Section:                    Shell Command Language 
Page Number:                2571 
Line Number:                83916, ff. 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2024-02-02 22:53 UTC
Last Modified:              2024-02-02 22:53 UTC
====================================================================== 
Summary:                    ambiguous description of which attribtes `unset`
unsets in case of readonly attribute being set
Description: 
Hey.

Lines 83916 to 83918 say:
> The unset utility shall unset each variable or function
> definition specified by name that does not have the
> readonly attribute and remove any attributes other than
> readonly that have been given to name (see Section 2.15
> export and readonly).

I'd interpret this as:

- Unless readonly is set, it unsets the variable/value (clearly).

- But IMO it's not absolutely clear what it does to attributes:
  "and remove any attributes other than readonly"
  would strictly speaking mean:
  - it does not unset readonly
  - it DOES unset any other attributes (i.e. export)

Those shells that I could test, behaved how one would expect, i.e. once
readonly is set, unset cannot modify the variable (neither it's value, nor
ANY of its attributes).


Desired Action: 
If the above assumption is correct, then:

Change lines 83916 to 83918 to:

The unset utility shall unset each variable or function definition
specified by name that does not have the readonly attribute. If name is
unset it shall further remove any attributes that have been given to it
(see Section 2.15 export and readonly), unless it has the readonly
attribute.



The subclause ", unless it has the readonly attribute" could in principle
also be omitted, but makes it perhaps clearer.


Thanks,
Chris.

btw: There is no specification, whether unset shall continue trying with
further names, if one readonly is encountered.
Not sure if that's left open by intention.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2024-02-02 22:53 calestyo       New Issue                                    
2024-02-02 22:53 calestyo       Name                      => Christoph Anton
Mitterer
2024-02-02 22:53 calestyo       Section                   => Shell Command
Language
2024-02-02 22:53 calestyo       Page Number               => 2571            
2024-02-02 22:53 calestyo       Line Number               => 83916, ff.      
======================================================================


  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to