Hi Alex, * Wilkinson, Alex <[email protected]> wrote: > > 0n Wed, Apr 01, 2009 at 10:53:06PM +0200, Ed Schouten wrote: > > >You can increase the maximum amount of PTYs by editing a lot of source > >files on your system. There is some good news: in -CURRENT we switched > >to Unix98-style PTYs (/dev/pts/%u). Right now the maximum amount of PTYs > >is limited to 1000 (0 to 999). > > What are "Unix98-style PTYs" ?
Unix98-style PTYS is a name often given to implementations of
pseudo-terminals that use a character device called /dev/ptmx to
allocate a new pseudo-terminal. After /dev/ptmx has been opened, it will
expose a new TTY in /dev/pts. The name of the TTY can be obtained using
routines like ptsname(). Operating systems like Linux and Solaris use
this as well.
FreeBSD's pts(4) driver also has a /dev/ptmx character device, but it's
just there for compatibility (Linux binary emulation, older -CURRENT
libcs). The preferred way to allocate pseudo-terminals is to call
posix_openpt(2).
An advantage of the current design is that allocating pseudo-terminals
can be done a lot more easily. On RELENG_[67] posix_openpt(3) is a libc
routine that has to loop through devfs to search for the first unused
pseudo-terminal. It also requires a set-uid utility (pt_chown) to change
the ownership of the TTY:
http://svn.freebsd.org/viewvc/base/stable/7/lib/libc/stdlib/grantpt.c?view=markup
In -CURRENT the TTYs are allocated on demand with the proper permissions
in place.
--
Ed Schouten <[email protected]>
WWW: http://80386.nl/
pgpbZIg13TEfl.pgp
Description: PGP signature

