Minutes of the 16 June 2011 Teleconference Austin-527 Page 1 of 1 Submitted by Andrew Josey, The Open Group. June 17 , 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 Apologies Eric Blake, Red Hat Andrew reported that he had moved 17 interpretations to proposed status starting their 30 day review. * 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 0000087: fflush and ungetc Accepted as marked http://austingroupbugs.net/view.php?id=87 This bug was reopened due to activity on bug 452. The notes to the editor have been revised. This item is tagged for TC1-2008. An interpretation is required. We will need to restart the 30 day review clock on this interpretation. 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: None. Notes to the Editor (not part of this interpretation): Make the change suggested in Note: 0000838 New proposed changes which take into account Note: 0000789 above, Note: 0000790 from 0000452 and email on the mailing list... Change: the file offset of the underlying open file description shall be adjusted so that the next operation on the open file description deals with the byte after the last one read from or written to the stream being flushed. to: the file offset of the underlying open file description shall be set to the file position of the stream, and any characters pushed back onto the stream by ungetc() or ungetwc() that have not subsequently been read from the stream shall be discarded (without further changing the file offset). At page 805 line 26801 section fclose, change: the file offset of the underlying open file description shall be adjusted so that the next operation on the open file description deals with the byte after the last one read from or written to the stream being closed. to: the file offset of the underlying open file description shall be set to the file position of the stream. On Page: 2151 Line: 67927 Section: ungetc() In the DESCRIPTION section, change from: The value of the file-position indicator for the stream after reading or discarding all pushed-back bytes shall be the same as it was before the bytes were pushed back. to: The value of the file-position indicator for the stream after all pushed-back bytes have been read, or discarded by calling fseek(), [CX]fseeko(),[/CX] fsetpos(), or rewind() [CX](but not fflush())[/CX], shall be the same as it was before the bytes were pushed back. On Page: 2152 Line: 67971 Section: ungetwc() In the DESCRIPTION section, change from: The value of the file-position indicator for the stream after reading or discarding all pushed-back characters shall be the same as it was before the characters were pushed back. to: The value of the file-position indicator for the stream after all pushed-back characters have been read, or discarded by calling fseek(), [CX]fseeko(),[/CX] fsetpos(), or rewind() [CX](but not fflush())[/CX], shall be the same as it was before the characters were pushed back. On Page: 2151 Line: 67920 Section: ungetc() In the DESCRIPTION section, change from: A successful intervening call (with the stream pointed to by stream) to a file-positioning function (fseek(), fsetpos(), or rewind()) shall discard any pushed-back bytes for the stream. to: A successful intervening call (with the stream pointed to by stream) to a file-positioning function (fseek(), [CX]fseeko(),[/CX] fsetpos(), or rewind()) [CX]or fflush()[/CX] shall discard any pushed-back bytes for the stream. On Page: 2152 Line: 67962 Section: ungetwc() In the DESCRIPTION section, change from: A successful intervening call (with the stream pointed to by stream) to a file-positioning function (fseek(), fsetpos(), or rewind()) shall discard any pushed-back bytes for the stream. to: A successful intervening call (with the stream pointed to by stream) to a file-positioning function (fseek(), [CX]fseeko(),[/CX] fsetpos(), or rewind()) [CX]or fflush()[/CX] shall discard any pushed-back bytes for the stream. [Note to the editor: these last two changes include the changes from Mantis bug 93.] Bug 0000458: Interpretation of $10 Accepted as Marked http://austingroupbugs.net/view.php?id=458 This item is tagged for TC1-2008. An interpretation is required. Interpretation response: The standard does not speak to this issue, and as such no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor. Rationale: Scripts in existing practice are known to depend on the behavior described in Option 1 of the Desired Actions. Notes to the Editor (not part of this interpretation): See Desired Actions, Option 1 for recommended action to take here. Bug 0000459: clarification on the value of n for the shift built-in command Accepted as Marked http://austingroupbugs.net/view.php?id=459 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: None. Notes to the Editor (not part of this interpretation): In the EXIT STATUS section change: The exit status is >0 if n>$#; otherwise, it is zero. to: If the n operand is invalid or is greater than $#, this may be considered a syntax error and a non-interactive shell may exit; if the shell does not exit in this case, a non-zero exit status shall be returned. Otherwise, zero shall be returned. Bug 0000460: detecting stderr write failures during getopt, wordexp Accepted http://austingroupbugs.net/view.php?id=460 This item is tagged for TC1-2008 Bug 0000461: missing shalls in interfaces new to Issue 7 Accepted http://austingroupbugs.net/view.php?id=461 This item is tagged for TC1-2008 Bug 0000462: recv() equivalency issues Accepted http://austingroupbugs.net/view.php?id=462 This item is tagged for TC1-2008 Bug 0000463: send() equivalency issues Accepted as Marked http://austingroupbugs.net/view.php?id=463 This item is tagged for TC1-2008 Change: The send() function is equivalent to sendto() with a null pointer dest_len argument, and to write() if no flags are used. to: If the socket argument refers to a connection-mode socket, the send() function is equivalent to sendto() (with any value for the dest_addr and dest_len arguments, as they are ignored in this case). If the socket argument refers to a socket and the flags argument is 0, the send() function is equivalent to write(). Bug 0000464: Inaccurate address_len description in socket functions Accepted http://austingroupbugs.net/view.php?id=464 This item is tagged for TC1-2008 Bug 0000391: ENOTSUP should not be a valid error for dirfd() Accepted http://austingroupbugs.net/view.php?id=391 This item is tagged for Issue 8 Bug 0000415: add SEEK_HOLE, SEEK_DATA to lseek Accepted as Marked http://austingroupbugs.net/view.php?id=415 This item is tagged for Issue 8 After line 1866 [XCU 3.191 Hard Link], add a new section and renumber accordingly: 3.192 Hole A contiguous region of bytes within a file, all having the value of zero. Not all bytes with the value zero need belong to a hole; however, all seekable files shall have a virtual hole starting at the current size of the file. A hole is typically created via truncate( ), or if an lseek( ) call has been made to position beyond the end of a file and data subsequently written at that point, although it is up to the implementation to define when sparse files can be created and with what granularity for the size of holes. After line 2492 [XCU 3.352 Space Character], add a new section and renumber accordingly: 3.353 Sparse File A file that contains more holes than just the virtual hole at the end of the file. At line 14869 [XBD DESCRIPTION], after: The header shall define SEEK_CUR, SEEK_END, and SEEK_SET as described in . add: Additionally, it shall define the following macros which shall expand to integer constant expressions with distinct values: SEEK_HOLE Seek forwards from offset relative to start-of-file for a position within a hole. SEEK_DATA Seek forwards from offset relative to start-of-file for a position not within a hole After line 41627 [XSH lseek DESCRIPTION], add two more bullets: If whence is SEEK_HOLE, the file offset shall be set to the smallest location of a byte within a hole and not less than offset, except that if offset falls beyond the last byte not within a hole, then the file offset may be set to the file size instead. It shall be an error if offset is greater or equal to the size of the file. If whence is SEEK_DATA, the file offset shall be set to the smallest location of a byte not within a hole and not less than offset. It shall be an error if no such byte exists. At line 41628 [XSH lseek DESCRIPTION], change: The symbolic constants SEEK_SET, SEEK_CUR, and SEEK_END are defined in . to: The symbolic constants SEEK_SET, SEEK_CUR, SEEK_END, SEEK_HOLE, and SEEK_DATA are defined in . A hole is a contiguous region of bytes within a file, all having the value of zero. Not all bytes with the value zero need belong to a hole; however, all seekable files shall have a virtual hole starting at the current size of the file, whether or not the file is sparse. After line 41645 [XSH lseek ERRORS], add: [ENXIO] The whence argument is SEEK_HOLE or SEEK_DATA, and offset is greater or equal to the file size; or the whence argument is SEEK_DATA and the offset falls beyond the last byte not within a hole. After line 41668 [XSH lseek RATIONALE], add: Not all filesystems support holes, and even where sparse files are supported, not all contiguous blocks of zero bytes are required to be recognized as a hole. However, since all files are required to have a virtual hole starting at the current file size, application writers can use SEEK_HOLE and SEEK_DATA to optimize algorithms that can run faster when it is known that a block of bytes is all zeros, because a non-sparse file will correctly report the entire file as a single non-hole. A trivial recursive implementation for these two constants would be as follows, however, for filesystems that support sparse files, implementations are encouraged to do better. off_t lseek(int fildes, off_t offset, int whence) { off_t cur, end; switch (whence) { case SEEK_HOLE: case SEEK_DATA: cur = lseek(fildes, 0, SEEK_CUR); if (cur < 0) return cur; end = lseek(fildes, 0, SEEK_END); if (end < 0) return end; if (offset < end) return whence == SEEK_HOLE ? end : lseek(fildes, offset, SEEK_SET); lseek(fildes, cur, SEEK_SET); errno = ENXIO; return -1; default: ... /* Existing implementation */ } } Other business: On Bug 226 awk grammar -- Andrew will send a reminder to Donn Terry (completed) Next Steps ---------- The next call is on June 23rd at 08:00 Pacific and will continue processing defect reports. This call will be for the regular 90 minutes. Note that the extra calls on June 24/June 29 have now been cancelled. 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