Minutes of the 23 June 2011 Teleconference Austin-528 Page 1 of 1 Submitted by Andrew Josey, The Open Group. June 25 , 2011 Attendees Andrew Josey, The Open Group Don Cragun, PASC OR Geoff Clare, The Open Group Mark Brown, IBM, TOG OR Jim Pugsley, Oracle Nick Stoughton, USENIX, ISO/IEC OR Eric Blake, Red Hat Andrew reported that the editors had now caught up with the TC1 bugs and draft 2 is on track to be released on schedule on June 30. Draft 2 will be feature complete. * Old Business Left open from last time Bug 0000411: adding atomic FD_CLOEXEC support OPEN http://austingroupbugs.net/view.php?id=411 Eric still has an open action to complete the changes for popen(). * New Business We picked up on Bug processing for bugs reported against project Issue 7. Bug 0000465: is the list of special built-ins exhaustive (is "local" special)? OPEN http://austingroupbugs.net/view.php?id=465 Action: Andrew to ask David Korn if he could look at this bug CLOSED Bug 0000351: certain shell special built-ins should expand arguments in assignment context Accept as Marked http://austingroupbugs.net/view.php?id=351 This item is tagged for Issue 8. An interpretation is required. Interpretation response: The standard states that the current behavior of ksh93 does not conform, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor. Rationale: Some shells behave as specified; some others match ksh93 behavior; and others have gone different routes. Notes to the Editor (not part of this interpretation): Make the changes suggested in Note: 0000618 (included here). Mail sequence 14988 proposed this in response to note 613: New definition in XBD 3: Declaration Command A utility which can take arguments that cause variable assignments (of the form varname=value) which will persist in the current shell environment. During parsing, when the shell recognizes a declaration command as the command name, then subsequent arguments that would be a valid variable assignment in isolation are subject to different expansion rules (field splitting and pathname expansion are suppressed, and tilde expansion occurs after the and any unquoted ). Arguments which are not a valid variable assignment in isolation are processed according to normal argument expansion rules. The following standard utilities are declaration commands: export, readonly, and certain instances of command. An implementation may provide other declaration commands. At line 3276, XBD 4.22 Variable Assignment, add: Assignment context occurs in the cmd_prefix portion of a shell simple command, as well as in arguments of a recognized declaration command. At line 71964, XCU 1.4 Utility Description Defaults DESCRIPTION, add: A standard utility shall not be treated as a declaration command unless explicitly stated in this section. At line 73093 (XCU 2.9.1 step 2), add: If the command name is recognized as a declaration command, then any remaining words that would be recognized as a variable assignment in isolation shall be expanded as a variable assignment (tilde expansion after the first and after any unquoted , parameter expansion, command substitution, arithmetic expansion, and quote removal, but no field splitting or pathname expansion); while words that would not be a variable assignment in isolation are subject to regular expansion. For all other command names, all subsequent words are subject to regular expansion (tilde expansion for only a leading , parameter expansion, command substitution, arithmetic expansion, field splitting, pathname expansion, and quote removal). After line 73100, add a paragraph: When determining whether a command name is declaration command, an implementation may use only lexical analysis. It is unspecified whether assignment context will be used if the command name is not known prior to the expansion of the first field which is not a variable assignment or redirection. At line 74276 (XCU export DESCRIPTION), add: The export special built-in shall be a declaration command. Therefore, during parsing of a simple command, if export is recognized as the command word, then subsequent words of the form name=word shall be expanded in an assignment context. At line 74360 (XCU readonly DESCRIPTION), add: The readonly special built-in shall be a declaration command. Therefore, during parsing of a simple command, if readonly is recognized as the command word, then subsequent words of the form name=word shall be expanded in an assignment context. At line 81462 (XCU command DESCRIPTION), add: The command utility shall be a declaration command if the command_name argument is recognized as a declaration command. Therefore, during parsing of a simple command, if command is recognized as the command word and a declaration command is recognized as the next argument, then subsequent words of the form name=word shall be expanded in an assignment context. At line 81588 (XCU command APPLICATION USAGE), add: The command utility takes on the parsing behavior of the command that it is wrapping. Therefore, command command export a=~ is recognized as a declaration command, and sets the variable a to the value of $HOME because it performs tilde-expansion of an assignment context; while command echo a=~ outputs the literal string "a=~" because regular expansion can only perform tilde-expansion at the beginning of the word. However, the shell need only perform lexical analysis of the command_name argument when deciding if command should be treated as a declaration command; therefore, with: var=export; command $var a=~ it is unspecified whether the word 'a=~' is handled in an assignment context or as a regular expansion. At line 124658 (XRAT C.2.9.1), add: Expansion of words in an assignment context following the command word can only occur for declaration commands, and only when the word can be used as a variable assignment in isolation. For example, this code sequence exports the single variable a with the value '1 b=2', but invokes make with the macro a set to '1' and b set to '2', since make is not a declaration command: $ set '1 b=2' $ export a=$1 $ make a=$1 Conversely, this code sequence exports two variables, a set to '1' and b set to '2', because the use of quoting means that the word could not be recognized as a variable assignment, and regular expansion rules require that field splitting occurs on the unquoted expansion of $1: $ set '1 b=2' $ export \a=$1 Likewise, this code sequence will not be parsed in assignment context, but is still required to export the variable named foo with the value 1: $ var=foo $ export $var=1 Implementations are permitted to provide extensions that serve as declaration commands, such as 'typeset' or 'local', or even a way to define a function that can behave as a declaration command. Declaration commands are only required to be recognized via lexical analysis; if any expansions are required before the command name is known, then it is unspecified whether subsequent arguments will be treated with an assignment context during expansion. For example, it is unspecified whether 'var=export; $var a=~' sets the variable a to a literal or to the value of $HOME, since lexical analysis sees '$var' rather than 'export' as the command name. 0000424: The list of mutually exclusive ls utility options is missing some entries. Accepted as Marked http://austingroupbugs.net/view.php?id=424 This item is tagged for TC1-2008. An interpretation is required. Interpretation response: The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor. Rationale: "When -l (ell) is specified, -1 (one) shall be assumed." is unclear Notes to the Editor (not part of this interpretation): Editor's note: In the rest of this discussion starts XSI shading and stops XSI shading. Change the SYNOPSIS on P2864, L93719 from: XSI ls [-ACFRSacdfiklmnpqrstux1] [-H|-L] [-go] [file...] to: XSI ls [-ikqrs] [-glno] [-A|-a] [-C|-m|-x|-1] \ [-F|-p] [-H|-L] [-R|-d] [-S|-f|-t] [-c|-u] [file...] Add to the end of the description of the -C option on P2864, L93751: This option disables long format output. Add to the end of the description of the -R option on P2865, L93768: The use of −R with −d or -f produces unspecified results. Change: with -R produces unspecified results in the description of -d on P2865, L93778 to: with -R or -f produces unspecified results Change the last sentence of the -f option description on P2865, L93780-93781: This option shall turn off -l, -t, -S, -s, and -r, and shall turn on -a. to: This option shall turn on -a. When -f is specified, any occurrences of the -r, -S, and -t options shall be ignored and any occurrences of the -A, -g, -l, -n, -o and -s options may be ignored. The use of -f with -R or -d produces unspecified results. Change the -g option description on P2865, L93782 from: The same as -l, except that the owner shall not be written. to: Turn on the -l (ell) option, but disable writing the file's owner name or number. Disable the -C, -m, and -x options. keeping XSI shading on the entire description of this option. Change the last sentence of the -l (ell) option description on P2865, L93788-93789 from: When -l (ell) is specified, -1 (one) shall be assumed. to: Disable the -C, -m, and -x options. Add to the end of the description of the -m option on P2865, L93790: This option disables long format output. Change -n option description on P2865, L93791-93792 from: The same as -l, except that the owner's UID and GID numbers shall be written, rather than the associated character strings. to: Turn on the -l (ell) option, but when writing the file's owner or group, write the file's numeric UID or GID rather than the user or group name, respectively. Disable the -C, -m, and -x options. Change -o option description on P2865, L93793 from: The same as -l, except that the group shall not be written. to: Turn on the -l (ell) option, but disable writing the file's group name or number. Disable the -C, -m, and -x options. keeping XSI shading on the entire description of this option. Add to the end of the -1 (one) option description on P2866, L93812: This option does not disable long format output. (Long format output is enabled by -g, -l (ell), -n, and -o; and disabled by -C, -m, and -x.) Add to the end of the description of the -x option on P2866, L93811: This option disables long format output. Change the text on P2866, L93813-93815 from: Specifying more than one of the options in the following mutually-exclusive pairs shall not be considered an error: -C and -l (ell), -m and -l (ell), -x and -l (ell), -C and -1 (one), -H and -L, -c and -u, -t and -S. The last option specified in each pair shall determine the output format. to: If an option that enables long format output (-g, -l (ell), -n, and -o) is given with an option that disables long format output (-C, -m, and -x), this shall not be considered an error. The last of these options specified shall determine whether long format output is written. If -R, -d, or -f are specified, the results of specifying these mutually-exclusive options are specified by the descriptions of these options above. If more than one of any of the other options shown in the SYNOPSIS section in mutually-exclusive sets are given, this shall not be considered an error; the last option specified in each set shall determine the output. Note that if -t is specified, -c and -u are not only mutually-exclusive with each other, they are also mutually-exclusive with -S when determining sort order. But even if -S is specified after all occurrences of -c, -t, and -u, the last use of -c or -u determines the timestamp printed when producing long format output. Change the rationale on P2871, L94022-94027 from: Generally, this volume of POSIX.1-2008 is silent about what Generally, this volume of POSIX.1-2008 is silent about what happens when options are given multiple times. In the cases of -C, -l, and -1, however, it does specify the results of these overlapping options. Since ls is one of the most aliased commands, it is important that the implementation perform intuitively. For example, if the alias were: alias ls="ls -C" and the user typed ls -1 (one), single-text-column output should result, not an error. to: This volume of POSIX.1-201x is frequently silent about what happens when mutually-exclusive options are specified. Except for -R, -d, and -f, the ls utility is required to accept multiple options from each mutually-exclusive option set without treating them as errors and to use the behavior specified by the last option given in each mutually-exclusive set. Since ls is one of the most aliased commands, it is important that the implementation perform intuitively. For example, if the alias were: alias ls="ls -C" and the user typed ls -1 (one), single-text-column output should result, not an error. The -g, -l (ell), -n and -o options are not mutually-exclusive options. They all enable long format output. They work together to determine whether the file's owner is written (no if -g is present), file's group is written (no if -o is present), and if the file's group or owner is written whether it is written as the name (default) or a string representation of the UID or GID number (if -n is present). The -C, -m, -x, and -1 (one) are mutually-exclusive options and the first three of these disable long format output. The -1 (one) option does not directly change whether or not long format output is enabled, but by overriding -C, -m, and -x, it can re-enable long format output that had been disabled by one of these options. Change the FUTURE DIRECTIONS section on P2872, L94057 from: None. to: Allowing -f to ignore the -A, -g, -l, -n, -o, and -s options may be removed in a future version. Bug 0000448: Simple memory manipulation should not corrupt errno Accepted http://austingroupbugs.net/view.php?id=428 This item is tagged for Issue 8 Next Steps ---------- The next call is on June 30th at 08:00 Pacific and will continue processing defect reports. This call will be for the regular 90 minutes. http://austingroupbugs.net See the calendar for the list of dialup numbers. An IRC channel will be available for the meeting irc://irc.freestandards.org #austin ICAL: http://www.google.com/calendar/ical/nvctqtstkuni3fab9k3jqtrt4g@group.calendar.google.com/public/basic XML: http://www.google.com/calendar/feeds/nvctqtstkuni3fab9k3jqtrt4g@group.calendar.google.com/public/basic