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.h | |
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.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 189c0f3b5..4ceba4e5d 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1456,6 +1456,7 @@ class fhandler_pty_slave: public fhandler_pty_common } }; +#define __ptsname(buf, unit) __small_sprintf ((buf), "/dev/pty%d", (unit)) class fhandler_pty_master: public fhandler_pty_common { int pktmode; // non-zero if pty in a packet mode. |