diff options
author | Christopher Faylor <me@cgf.cx> | 2003-01-03 06:20:23 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-01-03 06:20:23 +0000 |
commit | f3afe99b0b8de188814ae7e7f841d2566532ef27 (patch) | |
tree | c0ecbf0fe730c3fe33fdfc27ea4f3028599dd5fb /winsup/cygwin | |
parent | 7b061fd844f6ade0087cfde28eea223b2aa778a2 (diff) | |
download | cygnal-f3afe99b0b8de188814ae7e7f841d2566532ef27.tar.gz cygnal-f3afe99b0b8de188814ae7e7f841d2566532ef27.tar.bz2 cygnal-f3afe99b0b8de188814ae7e7f841d2566532ef27.zip |
* dtable.h (dtable::in_vfork_cleanup): New function. True if vfork cleanup
needed.
* dtable.cc (dtable::vfork_parent_restore): Remove assertion.
* pipe.cc (fhandler_pipe::close): Don't close read_state during fork_fixup
since it wasn't inherited.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 8 | ||||
-rw-r--r-- | winsup/cygwin/dtable.cc | 1 | ||||
-rw-r--r-- | winsup/cygwin/dtable.h | 1 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/pipe.cc | 2 |
5 files changed, 11 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 513dd826a..2c2e9eb5b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2003-01-03 Christopher Faylor <cgf@redhat.com> + + * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork + cleanup needed. + * dtable.cc (dtable::vfork_parent_restore): Remove assertion. + * pipe.cc (fhandler_pipe::close): Don't close read_state during + fork_fixup since it wasn't inherited. + 2003-01-01 Christopher Faylor <cgf@redhat.com> * passwd.cc (getpwuid_r32): Revert previous change. diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index be3e0da97..7b8e8272d 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -675,7 +675,6 @@ dtable::vfork_parent_restore () close_all_files (); fhandler_base **deleteme = fds; - assert (fds_on_hold != NULL); fds = fds_on_hold; fds_on_hold = NULL; cfree (deleteme); diff --git a/winsup/cygwin/dtable.h b/winsup/cygwin/dtable.h index 0223af71f..589a27a0d 100644 --- a/winsup/cygwin/dtable.h +++ b/winsup/cygwin/dtable.h @@ -79,6 +79,7 @@ public: void stdio_init (); void get_debugger_info (); void set_file_pointers_for_exec (); + bool in_vfork_cleanup () {return fds_on_hold == fds;} }; void dtable_init (void); diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 5176180b3..716846f89 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -1130,7 +1130,7 @@ void events_init (void) { char *name; - /* title_mutex protects modification of console title. It's neccessary + /* title_mutex protects modification of console title. It's necessary while finding console window handle */ if (!(title_mutex = CreateMutex (&sec_all_nih, FALSE, diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 9b0741001..ee3c72575 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -90,7 +90,7 @@ int fhandler_pipe::close () CloseHandle (guard); if (writepipe_exists) CloseHandle (writepipe_exists); - if (read_state) + if (read_state && !cygheap->fdtab.in_vfork_cleanup ()) CloseHandle (read_state); return res; } |