summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/dtable.cc5
-rw-r--r--winsup/cygwin/release/3.03
2 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 663f99b34..86e0c716d 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -857,12 +857,13 @@ dtable::set_file_pointers_for_exec ()
{
/* This is not POSIX-compliant so the function is only called for
non-Cygwin processes. */
- LONG off_high = 0;
+ LARGE_INTEGER eof = { QuadPart: 0 };
+
lock ();
fhandler_base *fh;
for (size_t i = 0; i < size; i++)
if ((fh = fds[i]) != NULL && fh->get_flags () & O_APPEND)
- SetFilePointer (fh->get_handle (), 0, &off_high, FILE_END);
+ SetFilePointerEx (fh->get_handle (), eof, NULL, FILE_END);
unlock ();
}
diff --git a/winsup/cygwin/release/3.0 b/winsup/cygwin/release/3.0
index 4cd422a56..da0fe0961 100644
--- a/winsup/cygwin/release/3.0
+++ b/winsup/cygwin/release/3.0
@@ -100,3 +100,6 @@ Bug Fixes
- Fix exception handling in pthreads.
Addresses: https://cygwin.com/ml/cygwin/2019-01/msg00149.html
+
+- Fix O_APPEND handling on files when calling non-Cygwin applications
+ Addresses: https://cygwin.com/ml/cygwin/2019-02/msg00081.html