diff options
author | Corinna Vinschen <vinschen@redhat.com> | 2007-12-14 11:32:50 +0000 |
---|---|---|
committer | Corinna Vinschen <vinschen@redhat.com> | 2007-12-14 11:32:50 +0000 |
commit | c5140214c39f4a387fe78f4b099edec0f150612f (patch) | |
tree | dc6eee505ef4d8fd67755457cdefa1fb27cb7295 | |
parent | 999141f8b9b44ae5a3e384d8df8137648dcf9dba (diff) | |
download | gdb-c5140214c39f4a387fe78f4b099edec0f150612f.tar.gz |
* 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.
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/dtable.cc | 5 | ||||
-rw-r--r-- | winsup/cygwin/spawn.cc | 3 |
3 files changed, 11 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 06136ffefa9..0a531c1a650 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 8948033eaf8..4523c17a46e 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -681,8 +681,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; @@ -690,7 +690,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 d2749d5a930..3f446da28f6 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -470,7 +470,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) |