summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/dtable.cc5
-rw-r--r--winsup/cygwin/spawn.cc3
3 files changed, 11 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 375167f00..f5db89dee 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2007-12-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * dtable.cc (dtable::set_file_pointers_for_exec): Reenable. Fix
+ comment.
+ * spawn.cc (spawn_guts): Call cygheap->fdtab.set_file_pointers_for_exec
+ only for non-Cygwin processes.
+
2007-12-13 Craig MacGregor <cmacgreg@gmail.com>
Corinna Vinschen <corinna@vinschen.de>
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index fc9b3a7e2..575384650 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -672,8 +672,8 @@ dtable::fixup_before_exec (DWORD target_proc_id)
void
dtable::set_file_pointers_for_exec ()
{
-/* This is not POSIX-compliant. */
-#if 0
+/* This is not POSIX-compliant so the function is only called for
+ non-Cygwin processes. */
LONG off_high = 0;
lock ();
fhandler_base *fh;
@@ -681,7 +681,6 @@ dtable::set_file_pointers_for_exec ()
if ((fh = fds[i]) != NULL && fh->get_flags () & O_APPEND)
SetFilePointer (fh->get_handle (), 0, &off_high, FILE_END);
unlock ();
-#endif
}
void
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 6e30b0530..67e064fb1 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -465,7 +465,8 @@ spawn_guts (const char * prog_arg, const char *const *argv,
cygbench ("spawn-guts");
- cygheap->fdtab.set_file_pointers_for_exec ();
+ if (!real_path.iscygexec())
+ cygheap->fdtab.set_file_pointers_for_exec ();
moreinfo->envp = build_env (envp, envblock, moreinfo->envc, real_path.iscygexec ());
if (!moreinfo->envp || !envblock)