diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2015-02-25 19:46:57 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-02-25 19:46:57 +0300 |
commit | 9d5309bf8911fbfee2270132da8446e81527f2fb (patch) | |
tree | 9f336e79e31f1272bc3c73d695f5cb7c6e4940d2 | |
parent | 67d150ca141181c55957c594346691ae8f9f5c3f (diff) |
* fhandler_tty.cc (fhandler_pty_slave::read): Having no input is not an
error condition for tcflush.
-rw-r--r-- | winsup/cygwin/ChangeLog | 12 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index d50351f8b..8c80f97e3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,17 @@ 2015-02-25 Corinna Vinschen <corinna@vinschen.de> + * fhandler_tty.cc (fhandler_pty_slave::read): Having no input is not an + error condition for tcflush. + +2015-02-25 Corinna Vinschen <corinna@vinschen.de> + + * fhandler_tape.cc (fhandler_dev_tape::_lock): Add cw_sig_restart to + cygwait call. + * thread.cc (pthread_mutex::lock): Ditto. + * thread.h (fast_mutex::lock): Ditto. + +2015-02-25 Corinna Vinschen <corinna@vinschen.de> + * security.cc (alloc_sd): Fix comment style. Remove code unused for years. diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 25076810e..9d793281a 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1,7 +1,7 @@ /* fhandler_tty.cc Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc. + 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc. This file is part of Cygwin. @@ -755,7 +755,8 @@ fhandler_pty_slave::read (void *ptr, size_t& len) /*NOTREACHED*/ case WAIT_TIMEOUT: termios_printf ("wait timed out, time_to_wait %u", time_to_wait); - if (!totalread) + /* No error condition when called from tcflush. */ + if (!totalread && ptr) { set_sig_errno (EAGAIN); totalread = -1; |