From owner-freebsd-stable@FreeBSD.ORG Tue Oct 2 12:25:00 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DFFF16A468 for ; Tue, 2 Oct 2007 12:25:00 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id 8EFA113C48A for ; Tue, 2 Oct 2007 12:24:59 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-31-60.bredband.comhem.se ([83.253.31.60]:60564 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.66) (envelope-from ) id 1IcgZQ-0007DX-9K for freebsd-stable@freebsd.org; Tue, 02 Oct 2007 14:09:49 +0200 Received: (qmail 30291 invoked from network); 2 Oct 2007 14:09:44 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 2 Oct 2007 14:09:44 +0200 Received: (qmail 33374 invoked by uid 1001); 2 Oct 2007 14:09:44 +0200 Date: Tue, 2 Oct 2007 14:09:44 +0200 From: Erik Trulsson To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20071002120944.GA33356@owl.midgard.homeip.net> Mail-Followup-To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , Steven Hartland , freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org References: <001f01c80407$1358d490$b6db87d4@multiplay.co.uk> <00ab01c8040c$7c408160$b6db87d4@multiplay.co.uk> <012101c804e5$efa7e9c0$b6db87d4@multiplay.co.uk> <86abr1yb68.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <86abr1yb68.fsf@ds4.des.no> User-Agent: Mutt/1.5.16 (2007-06-09) X-Originating-IP: 83.253.31.60 X-Scan-Result: No virus found in message 1IcgZQ-0007DX-9K. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1IcgZQ-0007DX-9K 5894beff0de8f30e61644c9aba8f9483 Cc: freebsd-hackers@freebsd.org, Steven Hartland , freebsd-stable@freebsd.org Subject: Re: How to enable more than 256 pty's? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2007 12:25:00 -0000 On Tue, Oct 02, 2007 at 02:05:03PM +0200, Dag-Erling Sm=F8rgrav wrote: > "Steven Hartland" writes: > > Any one got any pointers on this, the machine we running this app on is= over > > 90% idle so I really don't want to have to install a second machine jus= t to > > workaround a limit on the number of pty's, surely there's a way to incr= ease > > this? >=20 > You need to change the way ptys are named in pty_create_slave() and > pty_clone() in sys/kern/tty_pty.c. Just changing names won't help as > the sequence is also hardcoded in pty_clone(). >=20 > You also need to change grantpt(), openpty() and any other userland code > which has hardcoded knowledge of the naming scheme: >=20 > des@ds4 ~% gfs pqrsPQRS > src/sys/kern/tty_pty.c: static char *names =3D "pqrsPQRS"; > src/sys/kern/tty_pty.c: * pts =3D=3D /dev/tty[pqrsPQRS][0123456789abcdef= ghijklmnopqrstuv] > src/sys/kern/tty_pty.c: * ptc =3D=3D /dev/pty[pqrsPQRS][0123456789abcdef= ghijklmnopqrstuv] > src/contrib/telnet/telnetd/sys_term.c: for (cp =3D "pqrsPQRS"; *cp; cp++= ) { > src/usr.sbin/ac/ac.c: strchr("pqrsPQRS", us= r.ut_line[3]) !=3D 0 || > src/lib/libutil/pty.c: for (cp1 =3D "pqrsPQRS"; *cp1; cp1++) { > src/lib/libc/stdlib/grantpt.c: #define PT_DEV1 "pqrsPQRS" >=20 > Alternatively, set kern.pts.enable to 1, and find and fix the > hang-on-close bug in the pts code (if it hasn't been fixed already) This last option is only available if you are running 7-CURRENT though. The pts code is not in 6-STABLE (or older.) --=20 Erik Trulsson ertr1013@student.uu.se