A NOTE has been added to this issue. 
====================================================================== 
https://austingroupbugs.net/view.php?id=695 
====================================================================== 
Reported By:                dalias
Assigned To:                ajosey
====================================================================== 
Project:                    1003.1(2008)/Issue 7
Issue ID:                   695
Category:                   System Interfaces
Type:                       Clarification Requested
Severity:                   Editorial
Priority:                   normal
Status:                     Under Review
Name:                       Rich Felker 
Organization:               musl libc 
User Reference:              
Section:                    XSH 2.9.7 Thread Interactions with Regular File
Operations 
Page Number:                unknown 
Line Number:                unknown 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2013-05-12 04:08 UTC
Last Modified:              2022-08-18 15:49 UTC
====================================================================== 
Summary:                    Missing/lax atomicity requirements for file
operations
====================================================================== 

---------------------------------------------------------------------- 
 (0005934) geoffclare (manager) - 2022-08-18 15:49
 https://austingroupbugs.net/view.php?id=695#c5934 
---------------------------------------------------------------------- 
On D2.1 page 509 line 18074 section 2.9.7, change:<blockquote><b>Thread
Interactions with Regular File Operations</b>

All of the following functions shall be atomic with respect to each other
in the effects specified in POSIX.1-202x when they operate on regular files
or symbolic links:

[function list]

If two threads each call one of these functions, each call shall either see
all of the specified effects of the other call, or none of them. The
requirement on the <i>close</i>( ) function shall also apply whenever a
file descriptor is successfully closed, however caused (for example, as a
consequence of calling <i>close</i>( ), calling <i>dup2</i>( ), or of
process termination).</blockquote>to:<blockquote><b>Thread Interactions
with File Operations</b>

All of the following functions shall be atomic with respect to each other
in the effects specified in POSIX.1-202x when they operate on files in the
file hierarchy:

chmod( )
chown( )
creat( )
fchmod( )
fchmodat( )
fchown( )
fchownat( )
fstat( )
fstatat( )
ftruncate( )
futimens( )
lchown( )
link( )
linkat( )
lstat( )
open( )
openat( )
readlink( )
readlinkat( )
rename( )
renameat( )
stat( )
symlink( )
symlinkat( )
truncate( )
unlink( )
unlinkat( )
utimensat( )
utimes( )
[Note to the editor: arrange the above list into 5 columns]

If two threads each call one of these functions, each call shall either see
all of the specified effects of the other call, or none of them.

Except where specified otherwise, all of the following functions shall be
atomic with respect to each other in the effects specified in POSIX.1-202x
when they operate on file descriptors that are open, or being opened, to
files in the file hierarchy:

close( )
dup2( )
dup3( )
fcntl( )
fstat( )
fstatat( )
ftruncate( )
futimens( )
lseek( )
open( )
openat( )
pread( )
read( )
readv( )
pwrite( )
write( )
writev( )
[Note to the editor: arrange the above list into 5 columns]

If two threads each call one of these functions, each call shall either see
all of the specified effects of the other call, or none of them. The
requirement on the <i>close</i>( ) function shall also apply whenever a
file descriptor is successfully closed, however caused (for example, as a
consequence of calling <i>close</i>( ), calling <i>dup2</i>( ), or of
process termination).</blockquote>
On D2.1 page 881 line 27641 section fcntl(), change:<blockquote>set the
process ID or process group ID specified to receive SIGURG
signals</blockquote>to:<blockquote>atomically set the process ID or process
group ID specified to receive SIGURG signals</blockquote>
After D2.1 page 1885 line 61391 section shm_open(), add a new
paragraph:<blockquote>The following functions shall be atomic with respect
to each other in the effects specified in POSIX.1-202x when they operate on
 shared memory objects:

close(), ftruncate(), mmap(), shm_open(), shm_unlink()

If two threads each call one of these functions, each call shall either see
all of the specified effects of the other call, or none of them. The
requirement on the <i>close</i>( ) function shall also apply whenever a
file descriptor is successfully closed, however caused (for example, as a
consequence of calling <i>close</i>( ), calling <i>dup2</i>( ), or of
process termination).</blockquote> 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-05-12 04:08 dalias         New Issue                                    
2013-05-12 04:08 dalias         Status                   New => Under Review 
2013-05-12 04:08 dalias         Assigned To               => ajosey          
2013-05-12 04:08 dalias         Name                      => Rich Felker     
2013-05-12 04:08 dalias         Organization              => musl libc       
2013-05-12 04:08 dalias         Section                   => XSH 2.9.7 Thread
Interactions with Regular File Operations
2013-05-12 04:08 dalias         Page Number               => unknown         
2013-05-12 04:08 dalias         Line Number               => unknown         
2022-08-18 15:49 geoffclare     Note Added: 0005934                          
======================================================================


  • [1003.1(2008... 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