Minutes of the 11th April 2019 Teleconference Austin-925 Page 1 of 1 Submitted by Andrew Josey, The Open Group. 12th April 2019 Attendees: Don Cragun, IEEE PASC OR Andrew Josey, The Open Group (Partial) Joerg Schilling, FOKUS Fraunhofer Nick Stoughton, USENIX, ISO/IEC JTC 1/SC 22 OR Geoff Clare, The Open Group Eric Blake, Red Hat Mark Ziegast, SHware Systems Dev. * General news We are still working on revising the draft PAR for the major revision. Some adjustments to the proposed timeline had been made. Action: Core team members to review. Action: Andrew to collate open items from past meetings into one list, so we can assess what items might need addressing in the major revision. Completed after meeting and circulated to the Core mailing list. * Outstanding actions (Please note that this section has been flushed to shorten the minutes - to locate the previous set of outstanding actions, look to the minutes from 9 March 2018 and earlier) Bug 1077: Recommend support for wide-character regcomp and regexec and/or specify multi-byte behavior OPEN http://austingroupbugs.net/bug_view_page.php?bug_id=1077 Andrew has completed the action to ping his Apple contact and is awaiting a reply. Bug 1122: POSIX should include gettext() and friends OPEN http://austingroupbugs.net/view.php?id=1122 Left open as an action is still in progress to flesh out a complete proposal. * Current Business Bug 1212: "trap" (with no args) specification does not match reality Accepted as Marked http://austingroupbugs.net/view.php?id=1212 This item is tagged for Issue 8. Suggested changes ... In the SYNOPSIS, between lines 77484 and 77485 add a new form for the command trap -p [condition...] On page 2420 line 77487 change: If the first operand is an unsigned decimal integer, the shell shall treat all operands as conditions, and shall reset each condition to the default value. Otherwise, if there are operands, the first is treated as an action and the remaining as conditions. to: If the -p option is not specified and the first operand is an unsigned decimal integer, the shell shall treat all operands as conditions, and shall reset each condition to the default value. Otherwise, if the -p option is not specified and there are operands, the first operand shall be treated as an action and the remaining as conditions. On page 2420 line 77514 after applying bug 1211 change: The trap command with no operands shall write to standard output a list of commands associated with each condition which is not in its default state. to: The trap command with no operands shall write to standard output a list of commands associated with each of a set of conditions; if the -p option is not specified, this set shall contain only the conditions that are not in the default state (including signals that were ignored on entry to a non-interactive shell); if the -p option is specified, the set shall contain all conditions, except that it is unspecified whether conditions corresponding to the SIGKILL and SIGSTOP signals are included in the set. On page 2420 line 77522 after applying bug 1211 change: The shell shall format the output, including the proper use of quoting, so that it is suitable for reinput to the shell as commands that achieve the same trapping results for those traps that had previously been altered. to: The shell shall format the output, including the proper use of quoting, so that it is suitable for reinput to the shell as commands that achieve the same trapping results for the set of conditions included in the output, except for signals that were ignored on entry to the shell as described above. If this set includes conditions corresponding to the SIGKILL and SIGSTOP signals, the shell shall accept them when the output is reinput to the shell (where accepting them means they do not cause a non-zero exit status, a diagnostic message, or undefined behavior). On page 2420 line 77524 after applying bug 1211 change: save_traps=$(trap) trap "some command" INT QUIT save_traps="trap - INT QUIT; $save_traps" ... eval "$save_traps" to: save_traps=$(trap -p) ... eval "$save_traps" or: save_traps=$(trap -p INT QUIT) trap "some command" INT QUIT ... eval "$save_traps" On page 2421 line 77538 change the OPTIONS section from: None. to: The following option shall be supported: -p Write to standard output a list of commands associated with each condition operand. The behavior when there are no operands is specified in the DESCRIPTION section. The shell shall format the output, including the proper use of quoting, so that it is suitable for reinput to the shell as commands that achieve the same trapping results for the specified set of conditions. If a condition operand is a condition corresponding to the SIGKILL or SIGSTOP signal, and trap -p without any operands would not include it in the set of conditions for which it writes output, the behavior is undefined if the output is reinput to the shell. On page 2422 line 77564 after applying bug 1211 change APPLICATION USAGE to: When the -p option is not used, since trap with no operands does not output commands to restore traps that are currently set to default, these need to be restored separately. The RATIONALE section shows examples and describes their drawbacks. On page 2423 line 77604 add some new paragraphs to RATIONALE: The -p option was added because without it the method used to restore traps needs to include special handling of traps that are set to default when trap with no operands is used to save the current traps. One example is: save_traps=$(trap) trap "some command" INT QUIT save_traps="trap - INT QUIT; $save_traps" ... eval "$save_traps" but this method relies on hard-coding the commands to reset the traps that are being set. It also has a race condition if INT or QUIT was not set to default when saved, since it first sets them to default and then restores the saved traps. A more general approach would be: save_traps=$(trap) ... for sig in EXIT $( kill -l ) do case "$sig" in SIGKILL | KILL | sigkill | kill | SIGSTOP | STOP | sigstop | stop) ;; *) trap - $sig ;; esac done eval "$save_traps" This has the same race condition since it first sets all traps (that can be set) to default and then restores those that were not previously set to default. Historically, some shells behaved the same with and without -p when there are no operands. This standard requires that the set of conditions differs between the two cases: with -p it is all conditions (except possibly SIGKILL and SIGSTOP); without -p it is only the conditions that are not in the default state. On page 2423 line 77606 revert the bug 1211 change, so that FUTURE DIRECTIONS is: None. The rest of the call was spent discussing Joerg's suggestion for extending the ustar archive format (notes are in the etherpad) Next Steps ---------- The next calls are on: April 15th 2019 (Monday) This call will be for 60 minutes. April 18th 2019 (Thursday) This call will be for 90 minutes. Calls are anchored on US time. (8am Pacific) Apologies in advance: 2019-04-11 - 2019-04-25 inclusive Nick Stoughton http://austingroupbugs.net An etherpad is usually up for the meeting, with a URL using the date format as below: https://posix.rhansen.org/p/201x-mm-dd username=posix password=2115756#