summaryrefslogtreecommitdiffstats
path: root/generic/tclPipe.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-07-28 10:55:26 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-07-28 10:55:26 (GMT)
commit97b69e6ac0b3bfe72f1e3e4a490af5a45fb22776 (patch)
treeb6f48053c0501e02ccac6dcd024853731f4caa79 /generic/tclPipe.c
parent41ae541c110c5729d4467ce0c5c0a5bc9aa24d48 (diff)
downloadtcl-97b69e6ac0b3bfe72f1e3e4a490af5a45fb22776.zip
tcl-97b69e6ac0b3bfe72f1e3e4a490af5a45fb22776.tar.gz
tcl-97b69e6ac0b3bfe72f1e3e4a490af5a45fb22776.tar.bz2
* generic/tclPipe.c (TclCreatePipeline): Arrange for POSIX systems to
* unix/tclUnixPipe.c (TclpOpenFile): use the O_APPEND flag for * tests/exec.test (exec-19.1): files opened in a pipeline like ">>this". Note that Windows cannot support such access; there is no equivalent flag on the handle that can be set at the kernel-call level. The test is unix-specific in every way. [Bug 1245953]
Diffstat (limited to 'generic/tclPipe.c')
-rw-r--r--generic/tclPipe.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/generic/tclPipe.c b/generic/tclPipe.c
index 4238139..f7bc038 100644
--- a/generic/tclPipe.c
+++ b/generic/tclPipe.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPipe.c,v 1.11 2005/07/21 14:38:50 dkf Exp $
+ * RCS: @(#) $Id: tclPipe.c,v 1.12 2005/07/28 10:55:36 dkf Exp $
*/
#include "tclInt.h"
@@ -592,7 +592,13 @@ TclCreatePipeline(interp, argc, argv, pidArrayPtr, inPipePtr,
if (*p == '>') {
p++;
atOK = 0;
- flags = O_WRONLY | O_CREAT;
+
+ /*
+ * Note that the O_APPEND flag only has an effect on POSIX
+ * platforms. On Windows, we just have to carry on regardless.
+ */
+
+ flags = O_WRONLY | O_CREAT | O_APPEND;
}
if (*p == '&') {
if (errorClose != 0) {