* fhandler.cc (fhandler_base::set_inheritance): Just use DUPLICATE_CLOSE_SOURCE

to change inheritance.  Eliminate all other logic dealing with closed handles.
* fhandler.h (fhandler_base::set_inheritance): Reflect above change.
* fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto.
This commit is contained in:
Christopher Faylor
2001-09-20 20:58:29 +00:00
parent b1711a1f96
commit c50d56bc43
5 changed files with 24 additions and 43 deletions

View File

@@ -310,8 +310,7 @@ public:
unsigned long get_namehash () { return namehash; }
virtual void hclose (HANDLE h) {CloseHandle (h);}
virtual void set_inheritance (HANDLE &h, int not_inheriting,
const char *name = NULL);
virtual void set_inheritance (HANDLE &h, int not_inheriting);
/* fixup fd possibly non-inherited handles after fork */
void fork_fixup (HANDLE parent, HANDLE &h, const char *name);