A NOTE has been added to this issue. 
====================================================================== 
https://www.austingroupbugs.net/view.php?id=1561 
====================================================================== 
Reported By:                calestyo
Assigned To:                
====================================================================== 
Project:                    Issue 8 drafts
Issue ID:                   1561
Category:                   Shell and Utilities
Type:                       Enhancement Request
Severity:                   Editorial
Priority:                   normal
Status:                     New
Name:                       Christoph Anton Mitterer 
Organization:                
User Reference:              
Section:                    various 
Page Number:                N/A 
Line Number:                N/A 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2022-02-01 00:10 UTC
Last Modified:              2022-02-01 23:07 UTC
====================================================================== 
Summary:                    clarify what kind of data shell variables need to be
able to hold
====================================================================== 

---------------------------------------------------------------------- 
 (0005650) kre (reporter) - 2022-02-01 23:07
 https://www.austingroupbugs.net/view.php?id=1561#c5650 
---------------------------------------------------------------------- 
Re 4) again, I agree, unspecified.   But re
https://www.austingroupbugs.net/view.php?id=1561#c5649 I thought that it
was unspecified whether such things are passed through to children.  Our
shell
creates vars from the environment (exported ones of course) when the names
are
valid, and ignores anything else it sees there.   When running a child
process
all exported sh variables (and nothing else) is passed to the child as its
environment.

I suspect that the question about arrays was assuming that the environment
might contain something like:
    ARRAY[4]=7
if some shel decided to permit exporting individual elements of an array,

Lastly, and I'm not sure if this shold be considered as part of 2) or
added
as a new 5) - but is it anywhere specified what the shell is supposed to
do
if it receives an environment which contains
    X=1
    X=2
    X=3
??    Shells will never create such a thing, and I don't believe the env
command can do it either, but purpose written C code can easily set that
up.

rather than the whole array (in the case that a whole array is exported,
how
does bash, when importing it, distinguish that from a scalar var whose
contents just happen to be identical to whatever serialized format the
array contents are exported like ?)

And POSIX only requires POSIX names to work as shell function names,
though
that is a truly stupid limitation (it permits implementations to extend
it,
and most do I think).   We (NetBSD sh) don't allow exported functions, but
we do allow for every shell to read a startup file (not just interactive
shells)
so functions that one mighth want to export can be written there, and then
are available to all who follow (a script can make its own file and arrange
for
its children to read that one, if it wants to).

Lastly, when reading the standard, I believe that we must sometimes use
care
in assuming that "characters" means locale specific chars, rather than
bytes.
Much of the text is quite old, and has its origins in even older material,
and
that far ago, for most concerned people, characters and bytes were the
same
thing (which is why what we might now call an int8_t in C started out (and
still is though sometimes as a uint8_t) also called "char"). 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2022-02-01 00:10 calestyo       New Issue                                    
2022-02-01 00:10 calestyo       Name                      => Christoph Anton
Mitterer
2022-02-01 00:10 calestyo       Section                   => various         
2022-02-01 00:10 calestyo       Page Number               => N/A             
2022-02-01 00:10 calestyo       Line Number               => N/A             
2022-02-01 19:33 mirabilos      Note Added: 0005645                          
2022-02-01 19:44 calestyo       Note Added: 0005647                          
2022-02-01 20:52 chet_ramey     Note Added: 0005649                          
2022-02-01 23:07 kre            Note Added: 0005650                          
======================================================================


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