Minutes of the 18th August 2022 Teleconference Austin-1249 Page 1 of 1 Submitted by Andrew Josey, The Open Group. 20th August 2022 Attendees: Don Cragun, IEEE PASC OR Nick Stoughton, Logitech/USENIX, ISO/IEC JTC 1/SC 22 OR Eric Ackermann, HPI, University of Potsdam Eric Blake, Red Hat, The Open Group OR Geoff Clare, The Open Group Andrew Josey, The Open Group Mark Ziegast, SHware Systems Dev. Tom Thompson, IEEE * General news This was a call dedicated to general bugs. As a reminder we agreed previously that there will be NO meetings on 2022-08-29, 2022-09-05 (due to holidays in the UK and US respectively) * Current Business Bug 1122: POSIX should include gettext() and friends OPEN and https://posix.rhansen.org/p/gettext_draft Also https://austingroupbugs.net/file_download.php?file_id=64&type=bug Geoff's addition to XRAT appendix E and cancellation points lists have been noted to date. A new PDF will be needed, but we will continue to wait for more comments first. To be discussed again when more comments are raised. Bug 1560: clarify wording of command substitution https://austingroupbugs.net/view.php?id=1560 Leave this and related bugs 1561 and 1564 open awaiting reviews/discussion. Bug 1273: glob()'s GLOB_ERR/errfunc and non-directory files OPEN https://austingroupbugs.net/view.php?id=1273 We will leave this open awaiting feedback. Bug 768: add "fd-private" POSIX locks to spec OPEN https://austingroupbugs.net/view.php?id=768 Linux has now had OFD locks for several years, and more code in the wild is starting to use it - so we have existing practice (see note 2508) https://www.gnu.org/software/libc/manual/html_mono/libc.html#Open-File-Description-Locks Starting point of resolution at https://posix.rhansen.org/p/bug768 AI to EricB - take the GNU documentation and turn it into a desired action Bug 739: CX requirements for strftime seem to conflict with ISO C OPEN https://austingroupbugs.net/view.php?id=739 Nick completed his action to liaise with the C committee on this issue. C23 is about to go to ballot, so the way to raise the issue would be as a ballot comment. This could be done either as a UK or US national body comment. Andrew confirmed with the UK C Panel that we can submit comments. Bug 728: Restrictions on signal handlers are both excessive and insufficient OPEN https://austingroupbugs.net/view.php?id=728 The alignment with C17 changes the requirements in this area. There is still no allowance for accessing const objects or string literals, so that is something we could consider adding as an extension to C. Or we could raise the issue with the C committee if we want to stay in sync with the C standard. Suggestion: raise it as a C23 ballot comment. Depending on the answer, we could implement what they plan to do, or diverge (or leave things as they are). AI Nick and Geoff: File ballot comments on C23 (through the US and/or UK national bodies to WG14). Bug 708: Make mblen, mbtowc, and wctomb thread-safe for alignment with C11 OPEN https://austingroupbugs.net/view.php?id=708 This was discussed with WG14: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm#dr_498 Here is the current wording in C23:
The behavior of the multibyte character functions is affected by the LC_CTYPE category of the current locale. For a state-dependent encoding, each of the mbtowc and wctomb functions is placed into its initial conversion state prior to the first call to the function and can be returned to that state by a call for which its character pointer argument, s, is a null pointer. Subsequent calls with s as other than a null pointer cause the internal conversion state of the function to be altered as necessary. It is implementation-defined whether internal conversion state has thread storage duration, and whether a newly created thread has the same state as the current thread at the time of creation, or the initial conversion state. A call with s as a null pointer causes these functions to return a nonzero value if encodings have state dependency, and zero otherwise. Changing the LC_CTYPE category causes the internal object describing the conversion state of the mbtowc and wctomb functions to have an indeterminate representation.
DR 498 (URL above) seems to have an agreed wording change from April 2017, but it has not been applied. AI: Nick to ask the WG14 convenor what happened to that DR. Nick had completed his action. It appears the item was discussed but in the end the C committee could not agree an acceptable change, and no alternate proposal was available. We will need to accept the C wording for now. Bug 700: Clarify strtoul's behaviour on strings representing negative numbers OPEN https://austingroupbugs.net/view.php?id=700 AI: Nick and Geoff to work together on a C23 ballot comment (against N3047 7.24.1.7 para 5). Bug 695: Missing/lax atomicity requirements for file operations Accepted as Marked https://austingroupbugs.net/view.php?id=695 This item is tagged for Issue 8 On D2.1 page 509 line 18074 section 2.9.7, change: Thread Interactions with Regular File Operations 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 close( ) function shall also apply whenever a file descriptor is successfully closed, however caused (for example, as a consequence of calling close( ), calling dup2( ), or of process termination). to: Thread Interactions with File Operations 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 close( ) function shall also apply whenever a file descriptor is successfully closed, however caused (for example, as a consequence of calling close( ), calling dup2( ), or of process termination). On D2.1 page 881 line 27641 section fcntl(), change: set the process ID or process group ID specified to receive SIGURG signals to: atomically set the process ID or process group ID specified to receive SIGURG signals After D2.1 page 1885 line 61391 section shm_open(), add a new paragraph: 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 close( ) function shall also apply whenever a file descriptor is successfully closed, however caused (for example, as a consequence of calling close( ), calling dup2( ), or of process termination). Bug 689: Possibly unintended allowance for stdio deadlock OPEN https://austingroupbugs.net/view.php?id=689 Change needs to be coordinated with C23. AI: Nick and Geoff to work together on a C23 ballot comment (against N3047 7.23.3 para 3). Bug 662: Clarify or add file descriptor preservation and atomicity requirements for freopen Rejected https://austingroupbugs.net/view.php?id=662 If there is a valid fd underlying the stream but a lower fd is available, freopen() is required to close the current fd, and then open the lower one and associate it with the stream. We will start on bug 633 next time. Next Steps ---------- The next calls are on: Mon 2022-08-22 (general bugs) gettext is complete, but may be discussed again if comments are added Thu 2022-08-25 (general bugs) NO meetings on 2022-08-29, 2022-09-05 Apologies in advance: 2022-08-25 Andrew Josey 2022-08-22, 2022-08-25 Tom Thompson The calls are for 90 minutes Calls are anchored on US time. (8am Pacific) Please check the calendar invites for dial in details. Bugs are at: https://austingroupbugs.net An etherpad is usually up for the meeting, with a URL using the date format as below: https://posix.rhansen.org/p/20xx-mm-dd (For write access this uses The Open Group single sign on, for those individuals with gitlab.opengroup.org accounts. Please contact Andrew if you need to be setup)