summaryrefslogtreecommitdiffstats
path: root/sys/sys/ttycom.h
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2006-01-26 01:30:34 +0000
committercognet <cognet@FreeBSD.org>2006-01-26 01:30:34 +0000
commitaff5d6bf80c7cee1d2a2e3b664554663ba72ae78 (patch)
tree781a0e3abe81e06061d092e0f9ce65e0421206c0 /sys/sys/ttycom.h
parentc912f7e052a7a4f90c0e7de657678a40d3d13619 (diff)
downloadFreeBSD-src-aff5d6bf80c7cee1d2a2e3b664554663ba72ae78.zip
FreeBSD-src-aff5d6bf80c7cee1d2a2e3b664554663ba72ae78.tar.gz
Bring in a sysv-style pts implementation, as found in the rwatson_pts perforce branch. It works the same as its SysV/linux counterpart : You obtain a fd to the master pseudo terminal by opening /dev/ptmx, which craetes a node for the master as /dev/pty[num] and a node for the slave as /dev/pts/[num].
It should play nicely with the existing BSD ptys. By default, the system will use the BSD ptys, one can set the sysctl kern.pts.enable to 1 to make it use the new pts system. The max number of pty that can be allocated on a system can be changed with the sysctl kern.pts.max. It defaults to 1000, and can be increased, but it is not recommanded, as any pty with a number > 999 won't be handled by whatever uses utmp(5).
Diffstat (limited to 'sys/sys/ttycom.h')
-rw-r--r--sys/sys/ttycom.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/ttycom.h b/sys/sys/ttycom.h
index 07db4ec..4545d84 100644
--- a/sys/sys/ttycom.h
+++ b/sys/sys/ttycom.h
@@ -63,7 +63,7 @@ struct winsize {
/* 11-12 obsolete or unused */
#define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */
#define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */
- /* 15 unused */
+#define TIOCGPTN _IOR('t', 15, int) /* Get pts number. */
#define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */
/* 17-18 compat */
#define TIOCGETA _IOR('t', 19, struct termios) /* get termios struct */
OpenPOWER on IntegriCloud