diff options
author | Christopher Faylor <me@cgf.cx> | 2006-05-21 05:25:49 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-05-21 05:25:49 +0000 |
commit | b040009ecf27a18dc7b4d251137004f9f32120d4 (patch) | |
tree | c77669707b5c8fefa64fc0c59813547f3cac8330 /winsup/cygwin/dtable.cc | |
parent | 6118c524b0142cb2c1548aa2478434759e4696e8 (diff) | |
download | newlib-b040009ecf27a18dc7b4d251137004f9f32120d4.zip newlib-b040009ecf27a18dc7b4d251137004f9f32120d4.tar.gz newlib-b040009ecf27a18dc7b4d251137004f9f32120d4.tar.bz2 |
* debug.cc (add_handle): Print handle value when collision detected.
* dtable.cc (dtable::stdio_init): Cosmetic change.
* fhandler.h (fhandler_base::create_read_state): Protect handle.
(fhandler_pipe::create_guard): Ditto. Always mark the handle as inheritable.
(fhandler_pipe::is_slow): Return boolean value rather than numeric 1.
* pipe.cc (fhandler_pipe::fhandler_pipe): Always flag that we need fork fixup.
(fhandler_pipe::open): Don't pass security attributes to create_guard.
(fhandler_pipe::set_close_on_exec): Don't handle guard here.
(fhandler_pipe::close): Accommodate now-protected guard handle.
(fhandler_pipe::fixup_in_child): Don't proected read_state here.
(fhandler_pipe::fixup_after_exec): Close guard handle if close_on_exec.
(fhandler_pipe::fixup_after_fork): Don't bother with guard here.
(fhandler_pipe::dup): Don't set res to non-error prematurely. Use boolean
values where appropriate. Protect guard and read_state.
(fhandler_pipe::create): Don't call need_fork_fixup since it is now the
default. Don't protect read_state or guard.
* pipe.cc (fhandler_base::ready_for_read): Use bool values for "avail".
* spawn.cc (spawn_guts): Set cygheap->pid_handle as inheritable when
protecting.
* select.cc (fhandler_pipe::ready_for_read): Actually get the guard mutex for
blocking reads.
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r-- | winsup/cygwin/dtable.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index f22be55..85136ac 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -154,8 +154,8 @@ dtable::stdio_init () { /* Since this code is not invoked for forked tasks, we don't have to worry about the close-on-exec flag here. */ - if (!DuplicateHandle (hMainProc, out, hMainProc, &err, 0, - 1, DUPLICATE_SAME_ACCESS)) + if (!DuplicateHandle (hMainProc, out, hMainProc, &err, 0, true, + DUPLICATE_SAME_ACCESS)) { /* If that fails, do this as a fall back. */ err = out; |