A NOTE has been added to this issue. 
====================================================================== 
https://austingroupbugs.net/view.php?id=1598 
====================================================================== 
Reported By:                alanc
Assigned To:                
====================================================================== 
Project:                    1003.1(2016/18)/Issue7+TC2
Issue ID:                   1598
Category:                   System Interfaces
Type:                       Enhancement Request
Severity:                   Editorial
Priority:                   normal
Status:                     New
Name:                       Alan Coopersmith 
Organization:               Oracle Solaris 
User Reference:              
Section:                    putenv 
Page Number:                (page or range of pages) 
Line Number:                (Line or range of lines) 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2022-08-06 17:37 UTC
Last Modified:              2022-10-25 10:56 UTC
====================================================================== 
Summary:                    putenv should be allowed to fail with EINVAL
====================================================================== 

---------------------------------------------------------------------- 
 (0006013) geoffclare (manager) - 2022-10-25 10:56
 https://austingroupbugs.net/view.php?id=1598#c6013 
---------------------------------------------------------------------- 
Suggested changes...

On page 1751 line 56642 section putenv(), change:<blockquote>The
<i>putenv</i>() function shall use the <i>string</i> argument to set
environment variable values. The <i>string</i> argument should point to a
string of the form "<i>name</i>=<i>value</i>". The <i>putenv</i>() function
shall make the value of the environment variable <i>name</i> equal to
<i>value</i> by altering an existing variable or creating a new one. In
either case, the string pointed to by <i>string</i> shall become part of
the environment, so altering the string shall change the
environment.</blockquote>to:<blockquote>The <i>putenv</i>() function shall
use the <i>string</i> argument to set, or optionally unset, an environment
variable value:<ul>
<li>If the <i>string</i> argument points to a string of the form
"<i>name</i>=<i>value</i>", where <i>name</i> is a valid name, the
<i>putenv</i>() function shall make the value of the environment variable
with that name equal to <i>value</i> by altering an existing variable or
creating a new one. In either case, the string pointed to by <i>string</i>
shall become part of the environment, so altering the string shall change
the environment.</li>
<li>If the <i>string</i> argument points to a string containing a valid
name, the <i>putenv</i>() function shall either remove the environment
variable with that name (if it exists) from the environment or fail with
<i>errno</i> set to [EINVAL].</li>
<li>Otherwise, the behavior is unspecified.</li></ul></blockquote>
After page 1751 line 56652 section putenv(),
add:<blockquote>[EINVAL]<blockquote>The <i>string</i> argument points to a
string that is not of the form "<i>name</i>=<i>value</i>", where
<i>name</i> is a valid name.</blockquote></blockquote> 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2022-08-06 17:37 alanc          New Issue                                    
2022-08-06 17:37 alanc          Name                      => Alan Coopersmith
2022-08-06 17:37 alanc          Organization              => Oracle Solaris  
2022-08-06 17:37 alanc          Section                   => putenv          
2022-08-06 17:37 alanc          Page Number               => (page or range of
pages)
2022-08-06 17:37 alanc          Line Number               => (Line or range of
lines)
2022-08-08 09:02 geoffclare     Note Added: 0005926                          
2022-08-08 09:04 geoffclare     Project                  1003.1(2013)/Issue7+TC1
=> 1003.1(2016/18)/Issue7+TC2
2022-10-25 10:56 geoffclare     Note Added: 0006013                          
======================================================================


  • [1003.1(2016... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to