diff options
author | Christopher Faylor <me@cgf.cx> | 2009-06-15 03:42:09 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2009-06-15 03:42:09 +0400 |
commit | fee56469d473166006476374717805e0901bda0f (patch) | |
tree | 28aa717f4264869399392b91b4218ac47f580597 /winsup/cygwin/fhandler_tty.cc | |
parent | 313c719cb83191e8ea0072edba4d9d399737eac4 (diff) |
* errno.cc (errmap): Add mapping for ERROR_IO_INCOMPLETE.
* fhandler.cc (fhandler_base::fcntl): Fix comment.
(fhandler_base::wait_overlapped): Accept an optional len parameter. Use the
len parameter when WriteFile fails with ERROR_IO_PENDING. Make debug output
less alarming.
(fhandler_base::write_overlapped): Pass len to wait_overlapped.
* fhandler.h (fhandler_base::wait_overlapped): Add an optional argument
denoting the number of characters intended to be written.
* fhandler_tty.cc (fhandler_pty_master::close): Don't close archetype handles
when cygwin is still initializing since the handles aren't actually opened at
that point.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 994d356c0..979ffc3d8 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1184,10 +1184,13 @@ fhandler_pty_master::close () fhandler_tty_master *arch = (fhandler_tty_master *) archetype; termios_printf ("closing from_master(%p)/to_master(%p) since we own them(%d)", arch->from_master, arch->to_master, arch->dwProcessId); - if (!ForceCloseHandle (arch->from_master)) - termios_printf ("error closing from_master %p, %E", arch->from_master); - if (!ForceCloseHandle (arch->to_master)) - termios_printf ("error closing from_master %p, %E", arch->to_master); + if (cygwin_finished_initializing) + { + if (!ForceCloseHandle (arch->from_master)) + termios_printf ("error closing from_master %p, %E", arch->from_master); + if (!ForceCloseHandle (arch->to_master)) + termios_printf ("error closing from_master %p, %E", arch->to_master); + } fhandler_tty_common::close (); if (hExeced || get_ttyp ()->master_pid != myself->pid) |