summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_tty.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r--winsup/cygwin/fhandler_tty.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 954fd6622..6bb389f38 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -663,6 +663,8 @@ fhandler_pty_slave::write (const void *ptr, size_t len)
{
set_errno (get_ttyp ()->write_error);
towrite = (DWORD) -1;
+ get_ttyp ()->write_error = 0;
+ release_output_mutex ();
break;
}
@@ -681,7 +683,6 @@ fhandler_pty_slave::write (const void *ptr, size_t len)
}
raise (SIGHUP); /* FIXME: Should this be SIGTTOU? */
towrite = (DWORD) -1;
- release_output_mutex ();
break;
}
}