From owner-freebsd-questions Mon Feb 1 23:55:03 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA02241 for freebsd-questions-outgoing; Mon, 1 Feb 1999 23:55:03 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from orcrist.mediacity.com (orcrist.mediacity.com [208.138.36.146]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA02203 for ; Mon, 1 Feb 1999 23:55:00 -0800 (PST) (envelope-from gsutter@orcrist.mediacity.com) Received: (from gsutter@localhost) by orcrist.mediacity.com (8.8.8/8.8.8) id XAA28246; Mon, 1 Feb 1999 23:54:49 -0800 (PST) (envelope-from gsutter) Date: Mon, 1 Feb 1999 23:54:49 -0800 From: Gregory Sutter To: Greg Lehey Cc: "Brian W. Buchanan" , questions@FreeBSD.ORG Subject: Re: Increasing the pty limit Message-ID: <19990201235449.C26754@orcrist.mediacity.com> References: <19990201183647.X8473@freebie.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: <19990201183647.X8473@freebie.lemis.com>; from Greg Lehey on Mon, Feb 01, 1999 at 06:36:48PM +1030 Organization: Zer0 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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