diff options
author | Christopher Faylor <me@cgf.cx> | 2011-11-08 10:26:15 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2011-11-08 10:26:15 +0400 |
commit | 926014453f474ba583f485751600e851c4d5666a (patch) | |
tree | 43d5f55cfd8d95e980a5fa31014358fe69b5a82b /winsup/cygwin/fhandler_tty.cc | |
parent | 5d46c490dd1f5dc0b9a6c06e92e8773ba03acff2 (diff) |
* fhandler.h (__ptsname): New macro.
* dtable.cc (decode_tty): Use __ptsname to generate the slave pty name.
* fhandler_tty.cc (fhandler_pty_master::ptsname_r): Ditto.
* bsdlib.cc: Add needed includes for openpty() changes.
(openpty): Use __ptsname to generate the slave pty name. Close slave fd when
aslave == NULL.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index c68211b66..9431cb067 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1424,7 +1424,7 @@ fhandler_pty_master::ptsname_r (char *buf, size_t buflen) { char tmpbuf[TTY_NAME_MAX]; - __small_sprintf (tmpbuf, "/dev/pty%d", get_unit ()); + __ptsname (tmpbuf, get_unit ()); if (buflen <= strlen (tmpbuf)) { set_errno (ERANGE); |