* 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.
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user