How to increase number of pseudo terminals

Guy Harris auspex!guy at uunet.uu.net
Fri Apr 7 22:48:58 AEST 1989


>I increased the number of pseudo tty's supported on our Sun 3/280 under OS
>3.5 (about a year ago) by obtaining a modified version of tty_pty.o from
>Sun.  At the time, I was told that 64 is _the_ limit.

The use of "the" in "_the_ limit" is incorrect.  There are at least two
limits:

	1) The limit on the number of pseudo-ttys that the pseudo-tty
	   driver will support.  Prior to 4.0, that limit was compiled
	   into the pseudo-tty driver (tty_pty.o), and was 48 in the
	   distributed version.  In 4.0, it's configurable without
	   source, and can go up to 256, I think (since the minor device
	   number is one byte, you can't go above 256).

	2) The limit on the number of pseudo-ttys that programs using
	   pseudo-ttys will actually look at.  Those programs find a
	   free pseudo-tty by trying to open the "master" side of all
	   the system's pseudo-ttys until they succeed in opening one. 
	   They start by trying to open "/dev/ptyp0", and cycle up,
	   generally, through "/dev/ptysf".  That's a total of 64; they
	   only look at the first 64.  That limit is still present in
	   SunOS 4.0.



More information about the Comp.sys.sun mailing list