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-14 07:01 UTC ====================================================================== Summary: race condition with set -C ====================================================================== ---------------------------------------------------------------------- (0003487) shware_systems (reporter) - 2016-11-14 07:01 http://austingroupbugs.net/view.php?id=1016#c3487 ---------------------------------------------------------------------- It isn't just one application; sh is the focus as where an example of the desired behavior has defined semantics. Collateral effects on any app making use of system() to invoke "sh -c command-pipe-with-redirects", or utilities like awk and make with shell-like behavior also potentially can have this sort of race condition. This potential makes this more a defect of open(), as where atomicity can be guaranteed, than simply the shell, where it can't, as a feature many apps might want access to, but no implementation currently provides. While O_NOCLOBBER, as a design proposal, and being more explicit about the atomicity that can be required of noclobber, can be seen as more band-aid than solution to the general problem, it involves adaptations of known techniques that makes it viable (if barely) as a Future Direction recommendation. Should it be more general was brought up as nice in theory, and quickly rejected as being too much invention to even make an option. Something like that would involve new techniques, as you begin to touch upon, that don't have any sort of implementation yet. Just adding the hooks so new file types can advertise what degree of guarding against race conditions they need (are they more like regular files than pipes, or neither, sort of thing) I don't see as trivial. Last, afaik for many settings there is local scope, if the application where local behavior is needed is run in a subshell. The parent environment is unaffected for exported variable changes made in that subshell, at least. 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 ======================================================================