diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2015-02-25 16:46:57 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-02-25 16:46:57 +0000 |
commit | 9d5309bf8911fbfee2270132da8446e81527f2fb (patch) | |
tree | 9f336e79e31f1272bc3c73d695f5cb7c6e4940d2 /winsup/cygwin/fhandler_tty.cc | |
parent | 67d150ca141181c55957c594346691ae8f9f5c3f (diff) | |
download | newlib-9d5309bf8911fbfee2270132da8446e81527f2fb.zip newlib-9d5309bf8911fbfee2270132da8446e81527f2fb.tar.gz newlib-9d5309bf8911fbfee2270132da8446e81527f2fb.tar.bz2 |
* fhandler_tty.cc (fhandler_pty_slave::read): Having no input is not an
error condition for tcflush.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 2507681..9d79328 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; |