From: SourceForge.net <no...@so...> - 2005-07-28 15:30:31
|
Bugs item #1245953, was opened at 2005-07-27 13:12 Message generated for change (Comment added) made by dkf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1245953&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 25. Channel System Group: current: 8.5a3 >Status: Closed >Resolution: Fixed Priority: 9 Submitted By: Andreas Leitgeb (avl42) >Assigned to: Donal K. Fellows (dkf) Summary: exec ">>" does "a"-style opening, not "APPEND" Initial Comment: when I do: exec myprog >> logfile this happens: open("logfile", O_WRONLY|O_CREAT|O_LARGEFILE, 0666) = 5 _llseek(5, 0, [0], SEEK_END) = 0 This is just a bad thing. Everyone used to shell-syntax expects the file to be opened with the "O_APPEND" flag, such that two concurrent processes outputting to the same file will not overwrite each others output, but always append. ---------------------------------------------------------------------- >Comment By: Donal K. Fellows (dkf) Date: 2005-07-28 16:30 Message: Logged In: YES user_id=79902 Fixed in HEAD and 8.4 branch; test is a little fragile on very heavily loaded systems, but I don't know of any better way to test it easily. Note that Windows is not fixed, and cannot be fixed due to fundamental lamenesses in the Win32 API (i.e. no equivalent flag on file handles is available). Blame Microsoft. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2005-07-27 13:24 Message: Logged In: YES user_id=79902 O_APPEND looks universally available (or at least we already use it without having configure check for it) so absolutely no reason to not use it at all. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2005-07-27 13:18 Message: Logged In: YES user_id=79902 If O_APPEND is available (can we count on it?) we SHOULD use it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1245953&group_id=10894 |