From owner-freebsd-stable@FreeBSD.ORG Tue Oct 2 12:38:23 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 4827116A418 for ; Tue, 2 Oct 2007 12:38:23 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.186]) by mx1.freebsd.org (Postfix) with ESMTP id C8ABC13C474 for ; Tue, 2 Oct 2007 12:38:22 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by fk-out-0910.google.com with SMTP id b27so4975849fka for ; Tue, 02 Oct 2007 05:38:21 -0700 (PDT) Received: by 10.82.177.3 with SMTP id z3mr12023300bue.1191327258053; Tue, 02 Oct 2007 05:14:18 -0700 (PDT) Received: by 10.82.148.14 with HTTP; Tue, 2 Oct 2007 05:14:18 -0700 (PDT) Message-ID: Date: Tue, 2 Oct 2007 15:14:18 +0300 From: "Vlad GALU" To: "=?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?=" In-Reply-To: <86abr1yb68.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <001f01c80407$1358d490$b6db87d4@multiplay.co.uk> <00ab01c8040c$7c408160$b6db87d4@multiplay.co.uk> <012101c804e5$efa7e9c0$b6db87d4@multiplay.co.uk> <86abr1yb68.fsf@ds4.des.no> 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:38:23 -0000 On 10/2/07, 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? > > 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(). > > You also need to change grantpt(), openpty() and any other userland code > which has hardcoded knowledge of the naming scheme: > > 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" > > 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) Looks like it hasn't been. A friend who tried to set up an access server for his company stumbled upon it. > > DES > -- > Dag-Erling Sm=F8rgrav - des@des.no > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > --=20 If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it.