A NOTE has been added to this issue. 
====================================================================== 
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-13 20:10 UTC
====================================================================== 
Summary:                    ambiguous description of which attribtes `unset`
unsets in case of readonly attribute being set
====================================================================== 

---------------------------------------------------------------------- 
 (0006653) mirabilos (reporter) - 2024-02-13 20:10
 https://www.austingroupbugs.net/view.php?id=1806#c6653 
---------------------------------------------------------------------- 
Huh, this looks indeed like a bug introduced by 1075.

Specifically, the comment by joerg, which I read as “the bourne shell
first checks if the variable is readonly; if so, it errors; if not, it
unsets the content and removes all attributes”, and which corresponds to
my reading, was misinterpreted.

And when I start a jsh to test it, I get…

$ foo=bar
$ export foo
$ env | grep foo
foo=bar
$ readonly foo
$ env | grep foo
foo=bar
$ unset foo; echo $?
foo: is read only
$ echo $?
1
$ env | grep foo
foo=bar

… which supports my reading, and calestyo’s expected behaviour. 

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.      
2024-02-03 00:30 larryv         Note Added: 0006647                          
2024-02-13 20:10 mirabilos      Note Added: 0006653                          
======================================================================


  • [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
    • [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