A NOTE has been added to this issue. ====================================================================== http://austingroupbugs.net/view.php?id=1016 ====================================================================== Reported By: izabera Assigned To: ====================================================================== Project: 1003.1(2013)/Issue7+TC1 Issue ID: 1016 Category: Shell and Utilities Type: Enhancement Request Severity: Editorial Priority: normal Status: New Name: Isabella Organization: --- User Reference: --- Section: 2.7.2 Page Number: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_02
Line Number: last paragraph Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2015-12-28 13:52 UTC Last Modified: 2016-11-17 16:18 UTC ====================================================================== Summary: race condition with set -C ====================================================================== ---------------------------------------------------------------------- (0003493) geoffclare (manager) - 2016-11-17 16:18 http://austingroupbugs.net/view.php?id=1016#c3493 ---------------------------------------------------------------------- Interpretation response ------------------------ The standard states the requirements for redirection with '>' when set -C is in effect, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor. Rationale: ------------- Historical shells just called stat() to check if a regular file existed and then called creat(). The operation thus involved a race condition which meant that it could not be used for reliable creation of lock files or unique (often temporary) files. Modern shell implementations are instead using open() with the O_CREAT and O_EXCL flags set as one step in a multi-step process, although this makes their behavior differ from the behavior required by the standard in certain respects. Notes to the Editor (not part of this interpretation): ------------------------------------------------------- Make the changes in http://austingroupbugs.net/view.php?id=1016#c3485, choosing between option 1 and option 2 during work on the Issue 8 drafts. Issue History Date Modified Username Field Change ====================================================================== 2015-12-28 13:52 izabera New Issue 2015-12-28 13:52 izabera Name => Isabella 2015-12-28 13:52 izabera Organization => --- 2015-12-28 13:52 izabera User Reference => --- 2015-12-28 13:52 izabera Section => 2.7.2 2015-12-28 13:52 izabera Page Number => http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_02 2015-12-28 13:52 izabera Line Number => last paragraph 2015-12-31 05:58 shware_systems Note Added: 0002990 2015-12-31 12:52 jilles Note Added: 0002991 2015-12-31 14:21 shware_systems Note Added: 0002992 2015-12-31 17:05 nick Interp Status => --- 2015-12-31 17:05 nick Note Added: 0002993 2015-12-31 17:05 nick Description Updated 2016-10-20 16:40 geoffclare Note Added: 0003446 2016-10-31 16:23 geoffclare Note Added: 0003481 2016-10-31 16:28 geoffclare Note Edited: 0003481 2016-10-31 16:33 geoffclare Note Edited: 0003481 2016-11-10 17:33 rhansen Note Added: 0003485 2016-11-10 17:36 rhansen Note Edited: 0003485 2016-11-10 17:37 rhansen Note Edited: 0003485 2016-11-11 15:24 rhansen Note Edited: 0003485 2016-11-11 15:25 rhansen Note Edited: 0003485 2016-11-11 15:27 rhansen Note Edited: 0003485 2016-11-11 15:29 rhansen Note Edited: 0003485 2016-11-11 15:29 rhansen Note Edited: 0003485 2016-11-11 15:30 rhansen Note Edited: 0003485 2016-11-11 21:26 stephane Note Added: 0003486 2016-11-12 13:43 stephane Note Edited: 0003486 2016-11-14 07:01 shware_systems Note Added: 0003487 2016-11-14 09:30 geoffclare Note Added: 0003488 2016-11-14 10:10 stephane Note Added: 0003489 2016-11-14 10:28 stephane Note Added: 0003490 2016-11-14 10:47 geoffclare Note Added: 0003491 2016-11-14 15:55 shware_systems Note Added: 0003492 2016-11-14 16:17 shware_systems Note Edited: 0003492 2016-11-17 16:18 geoffclare Note Added: 0003493 ======================================================================