[Issue 8 drafts 0001577]: dup3 flags usage not entirely specified

2022-05-26 Thread Austin Group Bug Tracker via austin-group-l at The Open Group


The following issue has a resolution that has been APPLIED. 
== 
https://austingroupbugs.net/view.php?id=1577 
== 
Reported By:shware_systems
Assigned To:
== 
Project:Issue 8 drafts
Issue ID:   1577
Category:   System Interfaces
Type:   Omission
Severity:   Objection
Priority:   normal
Status: Applied
Name:   Mark Ziegast 
Organization:   SHware Systems Dev. 
User Reference:  
Section:dup3() 
Page Number:742 
Line Number:25487-91 
Final Accepted Text:https://austingroupbugs.net/view.php?id=1577#c5827 
Resolution: Accepted As Marked
Fixed in Version:   
== 
Date Submitted: 2022-04-07 16:20 UTC
Last Modified:  2022-05-26 10:37 UTC
== 
Summary:dup3 flags usage not entirely specified
==
Relationships   ID  Summary
--
related to  0001557 Better wording to describe FD_CLOEXEC.
related to  411 adding atomic FD_CLOEXEC support
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2022-04-07 16:20 shware_systems New Issue
2022-04-07 16:20 shware_systems Name  => Mark Ziegast
2022-04-07 16:20 shware_systems Organization  => SHware Systems Dev.
2022-04-07 16:20 shware_systems Section   => dup3()  
2022-04-07 16:20 shware_systems Page Number   => 742 
2022-04-07 16:20 shware_systems Line Number   => 25487-91
2022-04-07 18:31 kreNote Added: 0005786  
2022-04-28 15:50 Don Cragun Relationship added   related to 0001557  
2022-04-28 16:19 geoffclare Relationship added   related to 411  
2022-04-28 16:36 geoffclare Note Added: 0005827  
2022-04-28 16:37 geoffclare Final Accepted Text   =>
https://austingroupbugs.net/view.php?id=1577#c5827
2022-04-28 16:37 geoffclare Status   New => Resolved 
2022-04-28 16:37 geoffclare Resolution   Open => Accepted As
Marked
2022-04-28 16:37 geoffclare Tag Attached: issue8 
2022-05-26 10:37 geoffclare Status   Resolved => Applied 
==




[Issue 8 drafts 0001577]: dup3 flags usage not entirely specified

2022-04-28 Thread Austin Group Bug Tracker via austin-group-l at The Open Group


The following issue has been RESOLVED. 
== 
https://austingroupbugs.net/view.php?id=1577 
== 
Reported By:shware_systems
Assigned To:
== 
Project:Issue 8 drafts
Issue ID:   1577
Category:   System Interfaces
Type:   Omission
Severity:   Objection
Priority:   normal
Status: Resolved
Name:   Mark Ziegast 
Organization:   SHware Systems Dev. 
User Reference:  
Section:dup3() 
Page Number:742 
Line Number:25487-91 
Final Accepted Text:https://austingroupbugs.net/view.php?id=1577#c5827 
Resolution: Accepted As Marked
Fixed in Version:   
== 
Date Submitted: 2022-04-07 16:20 UTC
Last Modified:  2022-04-28 16:37 UTC
== 
Summary:dup3 flags usage not entirely specified
==
Relationships   ID  Summary
--
related to  0001557 Better wording to describe FD_CLOEXEC.
related to  411 adding atomic FD_CLOEXEC support
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2022-04-07 16:20 shware_systems New Issue
2022-04-07 16:20 shware_systems Name  => Mark Ziegast
2022-04-07 16:20 shware_systems Organization  => SHware Systems Dev.
2022-04-07 16:20 shware_systems Section   => dup3()  
2022-04-07 16:20 shware_systems Page Number   => 742 
2022-04-07 16:20 shware_systems Line Number   => 25487-91
2022-04-07 18:31 kreNote Added: 0005786  
2022-04-28 15:50 Don Cragun Relationship added   related to 0001557  
2022-04-28 16:19 geoffclare Relationship added   related to 411  
2022-04-28 16:36 geoffclare Note Added: 0005827  
2022-04-28 16:37 geoffclare Final Accepted Text   =>
https://austingroupbugs.net/view.php?id=1577#c5827
2022-04-28 16:37 geoffclare Status   New => Resolved 
2022-04-28 16:37 geoffclare Resolution   Open => Accepted As
Marked
==




[Issue 8 drafts 0001577]: dup3 flags usage not entirely specified

2022-04-28 Thread Austin Group Bug Tracker via austin-group-l at The Open Group


A NOTE has been added to this issue. 
== 
https://austingroupbugs.net/view.php?id=1577 
== 
Reported By:shware_systems
Assigned To:
== 
Project:Issue 8 drafts
Issue ID:   1577
Category:   System Interfaces
Type:   Omission
Severity:   Objection
Priority:   normal
Status: New
Name:   Mark Ziegast 
Organization:   SHware Systems Dev. 
User Reference:  
Section:dup3() 
Page Number:742 
Line Number:25487-91 
Final Accepted Text: 
== 
Date Submitted: 2022-04-07 16:20 UTC
Last Modified:  2022-04-28 16:36 UTC
== 
Summary:dup3 flags usage not entirely specified
==
Relationships   ID  Summary
--
related to  0001557 Better wording to describe FD_CLOEXEC.
related to  411 adding atomic FD_CLOEXEC support
== 

-- 
 (0005827) geoffclare (manager) - 2022-04-28 16:36
 https://austingroupbugs.net/view.php?id=1577#c5827 
-- 
(The following changes make the wording for dup3() and pipe2() consistent
with accept4().)

Change:The dup3() function shall be equivalent to the
dup2() function if the flag argument is 0, except that it
shall be an error if fildes is equal to fildes2.
Additionally, the flag argument can be constructed from a
bitwise-inclusive OR of flags from the following
list:to:The dup3() function shall be
equivalent to the dup2() function, except that it shall be an error
if fildes is equal to fildes2, and the state of FD_CLOEXEC
and FD_CLOFORK on the fildes2 file descriptor shall be determined
solely by the flag argument, which can be constructed from a
bitwise-inclusive OR of flags from the following list:

On page 1413 line 47116 section pipe(), change:The
pipe2() function shall be equivalent to the pipe() function
if the flag argument is 0. Additionally, the flag argument
can be constructed from a bitwise-inclusive OR of flags from the following
list (provided by ):to:The pipe2()
function shall be equivalent to the pipe() function, except that the
state of O_NONBLOCK on the new file descriptions and FD_CLOEXEC and
FD_CLOFORK on the new file descriptors shall be determined solely by the
flag argument, which can be constructed from a bitwise-inclusive OR
of flags from the following list (provided by ): 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2022-04-07 16:20 shware_systems New Issue
2022-04-07 16:20 shware_systems Name  => Mark Ziegast
2022-04-07 16:20 shware_systems Organization  => SHware Systems Dev.
2022-04-07 16:20 shware_systems Section   => dup3()  
2022-04-07 16:20 shware_systems Page Number   => 742 
2022-04-07 16:20 shware_systems Line Number   => 25487-91
2022-04-07 18:31 kreNote Added: 0005786  
2022-04-28 15:50 Don Cragun Relationship added   related to 0001557  
2022-04-28 16:19 geoffclare Relationship added   related to 411  
2022-04-28 16:36 geoffclare Note Added: 0005827  
==




[Issue 8 drafts 0001577]: dup3 flags usage not entirely specified

2022-04-28 Thread Austin Group Bug Tracker via austin-group-l at The Open Group


The following issue has been set as RELATED TO issue 411. 
== 
https://austingroupbugs.net/view.php?id=1577 
== 
Reported By:shware_systems
Assigned To:
== 
Project:Issue 8 drafts
Issue ID:   1577
Category:   System Interfaces
Type:   Omission
Severity:   Objection
Priority:   normal
Status: New
Name:   Mark Ziegast 
Organization:   SHware Systems Dev. 
User Reference:  
Section:dup3() 
Page Number:742 
Line Number:25487-91 
Final Accepted Text: 
== 
Date Submitted: 2022-04-07 16:20 UTC
Last Modified:  2022-04-28 16:19 UTC
== 
Summary:dup3 flags usage not entirely specified
==
Relationships   ID  Summary
--
related to  0001557 Better wording to describe FD_CLOEXEC.
related to  411 adding atomic FD_CLOEXEC support
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2022-04-07 16:20 shware_systems New Issue
2022-04-07 16:20 shware_systems Name  => Mark Ziegast
2022-04-07 16:20 shware_systems Organization  => SHware Systems Dev.
2022-04-07 16:20 shware_systems Section   => dup3()  
2022-04-07 16:20 shware_systems Page Number   => 742 
2022-04-07 16:20 shware_systems Line Number   => 25487-91
2022-04-07 18:31 kreNote Added: 0005786  
2022-04-28 15:50 Don Cragun Relationship added   related to 0001557  
2022-04-28 16:19 geoffclare Relationship added   related to 411  
==




[Issue 8 drafts 0001577]: dup3 flags usage not entirely specified

2022-04-28 Thread Austin Group Bug Tracker via austin-group-l at The Open Group


The following issue has been set as RELATED TO issue 0001557. 
== 
https://austingroupbugs.net/view.php?id=1577 
== 
Reported By:shware_systems
Assigned To:
== 
Project:Issue 8 drafts
Issue ID:   1577
Category:   System Interfaces
Type:   Omission
Severity:   Objection
Priority:   normal
Status: New
Name:   Mark Ziegast 
Organization:   SHware Systems Dev. 
User Reference:  
Section:dup3() 
Page Number:742 
Line Number:25487-91 
Final Accepted Text: 
== 
Date Submitted: 2022-04-07 16:20 UTC
Last Modified:  2022-04-28 15:50 UTC
== 
Summary:dup3 flags usage not entirely specified
==
Relationships   ID  Summary
--
related to  0001557 Better wording to describe FD_CLOEXEC.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2022-04-07 16:20 shware_systems New Issue
2022-04-07 16:20 shware_systems Name  => Mark Ziegast
2022-04-07 16:20 shware_systems Organization  => SHware Systems Dev.
2022-04-07 16:20 shware_systems Section   => dup3()  
2022-04-07 16:20 shware_systems Page Number   => 742 
2022-04-07 16:20 shware_systems Line Number   => 25487-91
2022-04-07 18:31 kreNote Added: 0005786  
2022-04-28 15:50 Don Cragun Relationship added   related to 0001557  
==




[Issue 8 drafts 0001577]: dup3 flags usage not entirely specified

2022-04-07 Thread Austin Group Bug Tracker via austin-group-l at The Open Group


A NOTE has been added to this issue. 
== 
https://austingroupbugs.net/view.php?id=1577 
== 
Reported By:shware_systems
Assigned To:
== 
Project:Issue 8 drafts
Issue ID:   1577
Category:   System Interfaces
Type:   Omission
Severity:   Objection
Priority:   normal
Status: New
Name:   Mark Ziegast 
Organization:   SHware Systems Dev. 
User Reference:  
Section:dup3() 
Page Number:742 
Line Number:25487-91 
Final Accepted Text: 
== 
Date Submitted: 2022-04-07 16:20 UTC
Last Modified:  2022-04-07 18:31 UTC
== 
Summary:dup3 flags usage not entirely specified
== 

-- 
 (0005786) kre (reporter) - 2022-04-07 18:31
 https://austingroupbugs.net/view.php?id=1577#c5786 
-- 
There is no "inheriting both of them without change" - that happens only
in dup2() when filedes1 == filedes2 (ie: that operation is a no-op).

For dup3() it is prohibited for filedes1 to be the same as filedes2, so
that situation cannot occur (though the wording for this could be
improved to make it clearer that it is not only when flags==0 that
that prohibition applies ... other than that would make no sense, we do
not need dup3() to be able to manipulate the flag bits for a fd, we have
fcntl() for that).

dup2() clears the flags, except in the no-op case.   dup3() sets the
flags to exactly what is given in the flags arg.

I do agree that this should be clearer in the standard, it currently
just says that the flags arg can be the inclusive or of the 2 bits.
It nowhere says what then happens with that arg.   It should specify
that the flags for the new fd (filedes2) are set (as if by open). 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2022-04-07 16:20 shware_systems New Issue
2022-04-07 16:20 shware_systems Name  => Mark Ziegast
2022-04-07 16:20 shware_systems Organization  => SHware Systems Dev.
2022-04-07 16:20 shware_systems Section   => dup3()  
2022-04-07 16:20 shware_systems Page Number   => 742 
2022-04-07 16:20 shware_systems Line Number   => 25487-91
2022-04-07 18:31 kreNote Added: 0005786  
==




[Issue 8 drafts 0001577]: dup3 flags usage not entirely specified

2022-04-07 Thread Austin Group Bug Tracker via austin-group-l at The Open Group


The following issue has been SUBMITTED. 
== 
https://austingroupbugs.net/view.php?id=1577 
== 
Reported By:shware_systems
Assigned To:
== 
Project:Issue 8 drafts
Issue ID:   1577
Category:   System Interfaces
Type:   Omission
Severity:   Objection
Priority:   normal
Status: New
Name:   Mark Ziegast 
Organization:   SHware Systems Dev. 
User Reference:  
Section:dup3() 
Page Number:742 
Line Number:25487-91 
Final Accepted Text: 
== 
Date Submitted: 2022-04-07 16:20 UTC
Last Modified:  2022-04-07 16:20 UTC
== 
Summary:dup3 flags usage not entirely specified
Description: 
The current description for dup3() specifies the expected behavior when no
bits are set in the flags argument, by reference to dup2 (either clearing
the bits or inheriting both of them without change), and when all bits are
set, in that specifying FD_CLOFORK and FD_CLOEXEC are both expected to be
set in this case. The description does not specify what is to occur when
one bit is set and the other is not specified; does this mean the setting
for the unspecified bit is inherited from the fd being referenced or is it
to be cleared, ignoring how it was set originally.

As example:
int fd2=open("./tmp", O_RDWR | O_CLOFORK | O_CREAT);
int fd=3;
fd=dup3(fd, fd2, O_CLOEXEC);

Does fd have only FD_CLOEXEC only set, clearing FD_CLOFORK set in the
open() call, or are both FD_CLOEXEC and FD_CLOFORK set?

An invoke like
fd=dup3(fd2, fd2, O_CLOEXEC) 
would lead from reference to dup2 that both be set.

Desired Action: 
Make it explicit which is the expected behavior, whether the input
descriptors are the same or different, when only one O_* flag is specified.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2022-04-07 16:20 shware_systems New Issue
2022-04-07 16:20 shware_systems Name  => Mark Ziegast
2022-04-07 16:20 shware_systems Organization  => SHware Systems Dev.
2022-04-07 16:20 shware_systems Section   => dup3()  
2022-04-07 16:20 shware_systems Page Number   => 742 
2022-04-07 16:20 shware_systems Line Number   => 25487-91
==