Date: Mon, 1 Feb 1999 23:54:49 -0800 From: Gregory Sutter <gsutter@pobox.com> To: Greg Lehey <grog@lemis.com> Cc: "Brian W. Buchanan" <brian@CSUA.Berkeley.EDU>, questions@FreeBSD.ORG Subject: Re: Increasing the pty limit Message-ID: <19990201235449.C26754@orcrist.mediacity.com> In-Reply-To: <19990201183647.X8473@freebie.lemis.com>; from Greg Lehey on Mon, Feb 01, 1999 at 06:36:48PM %2B1030 References: <Pine.BSF.4.05.9901312211590.480-100000@smarter.than.nu> <19990201183647.X8473@freebie.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 01, 1999 at 06:36:48PM +1030, Greg Lehey wrote:
> On Sunday, 31 January 1999 at 22:24:45 -0800, Brian W. Buchanan wrote:
> > I like to open lots of xterms, but I've found that once I have 16 ptys in
> > use, I can't spawn any more. I've rebuilt my kernel with:
> >
> > pseudo-device pty 32
> >
> > And I know I have enough pty device entries in /dev, but I still run into
> > the 16-pty limit.
>
> How do you know you're running into the 16 pty limit? What's the
> message? What are the names of your second group of 16 ptys?
Actually, they seem to be allocated in groups of 32, not 16. From
/dev/MAKEDEV: [1]
pty*)
class=`expr $i : 'pty\(.*\)'`
case $class in
0) offset=0 name=p;;
1) offset=32 name=q;;
2) offset=64 name=r;;
3) offset=96 name=s;;
# Note that xterm (at least) only look at p-s.
4) offset=128 name=P;;
5) offset=160 name=Q;;
6) offset=192 name=R;;
7) offset=224 name=S;;
# This still leaves [tuTU].
*) echo bad unit for pty in: $i;;
esac
case $class in
0|1|2|3|4|5|6|7)
umask 0
eval `echo $offset $name | awk ' { b=$1; n=$2 } END { \
for (i = 0; i < 32; i++) {
c = substr("0123456789abcdefghijklmnopqrstuv", i
+ 1, 1); \
printf("mknod tty%s%s c 5 %d; \
mknod pty%s%s c 6 %d;", \
n, c, b+i, \
n, c, b+i); \
} \
}'`
umask 77
;;
esac
;;
[1] The MAKEDEV man page specifies groups of 16. Odd. Not updated
perhaps. docs/9879.
Greg
--
Gregory S. Sutter The best way to accelerate Windows
mailto:gsutter@pobox.com is at 9.8 m/s^2.
http://www.pobox.com/~gsutter/
PGP DSS public key 0x40AE3052
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990201235449.C26754>
