Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-10-10 08:05:29 +0400
committerChristopher Faylor <me@cgf.cx>2011-10-10 08:05:29 +0400
commit336e8ee6852b3c3aa9e2dc6e83d8d156c017481e (patch)
tree809070d1baaedd1d0d62afbe907aaa7afc4f357e /winsup
parent3d1dd0789e32f3c9d99692c79bdfdb8e6e4b4be6 (diff)
* fhandler_tty.cc (fhandler_pty_slave::open): Clarify debugging output.
(fhandler_pty_slave::open): Change ENOENT to ENXIO when can't open a tty.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/fhandler_tty.cc7
2 files changed, 11 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 186f22fa2..c47b9e492 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-10 Christopher Faylor <me.cygwin2011@cgf.cx>
+
+ * fhandler_tty.cc (fhandler_pty_slave::open): Clarify debugging output.
+ (fhandler_pty_slave::open): Change ENOENT to ENXIO when can't open a
+ tty.
+
2011-10-07 Corinna Vinschen <corinna@vinschen.de>
Christopher Faylor <me.cygwin2011@cgf.cx>
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 5236430cc..0d16130be 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -457,7 +457,7 @@ fhandler_pty_slave::open (int flags, mode_t)
{
pty_owner = OpenProcess (PROCESS_DUP_HANDLE, FALSE, p->dwProcessId);
if (pty_owner)
- termios_printf ("dup handles directly since I'm allmighty.");
+ termios_printf ("dup handles directly since I'm the owner");
}
}
if (pty_owner)
@@ -522,7 +522,10 @@ fhandler_pty_slave::open (int flags, mode_t)
return 1;
err:
- __seterrno ();
+ if (GetLastError () == ERROR_FILE_NOT_FOUND)
+ set_errno (ENXIO);
+ else
+ __seterrno ();
err_no_errno:
termios_printf (errmsg);
err_no_msg: