From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 2 15:34:27 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B6A716A41B; Tue, 2 Oct 2007 15:34:27 +0000 (UTC) (envelope-from prvs=17958a6d43=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 69C8A13C4B5; Tue, 2 Oct 2007 15:34:25 +0000 (UTC) (envelope-from prvs=17958a6d43=killing@multiplay.co.uk) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=multiplay.co.uk; s=Multiplay; t=1191338985; x=1191943785; q=dns/txt; h=Received: Message-ID:From:To:Cc:References:Subject:Date:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=rWGTnKcFvV4rOZkUD5asl e6B0d3LY9qPHrkIqIY75kk=; b=Pd+SkGdLa5rest5EYi85rd2l35+aj5FIJ99ID /Z3sE52wfYZdsTkDFQ0RztqfVVQUzZ3qYnM70IsjwZKks9UdWOGOLmSwSuJ5sjDd Ih/MlSUFoZxom133204g/zg/DjY3bPFt5m8CwhQzvtTG7Q+5oe1yTRskPhnCqwwY vSp9BI= X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-14.7 required=6.0 tests=BAYES_00, USER_IN_WHITELIST, USER_IN_WHITELIST_TO autolearn=ham version=3.1.8 Received: from r2d2 by mail1.multiplay.co.uk (MDaemon PRO v9.6.2) with ESMTP id md50004269074.msg; Tue, 02 Oct 2007 16:29:43 +0100 Message-ID: <032f01c80509$0ddc8720$b6db87d4@multiplay.co.uk> From: "Steven Hartland" To: =?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?= References: <001f01c80407$1358d490$b6db87d4@multiplay.co.uk><00ab01c8040c$7c408160$b6db87d4@multiplay.co.uk><012101c804e5$efa7e9c0$b6db87d4@multiplay.co.uk> <86abr1yb68.fsf@ds4.des.no> Date: Tue, 2 Oct 2007 16:29:42 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-Authenticated-Sender: Killing@multiplay.co.uk X-MDRemoteIP: 212.135.219.182 X-Return-Path: prvs=17958a6d43=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-Spam-Processed: mail1.multiplay.co.uk, Tue, 02 Oct 2007 16:29:44 +0100 X-MDAV-Processed: mail1.multiplay.co.uk, Tue, 02 Oct 2007 16:29:45 +0100 Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: How to enable more than 256 pty's? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2007 15:34:27 -0000 Thanks for the tip there but I cant find any function called pty_create_slave in the source. N.B. Machine is running 5.4 but I also looked on 6.2 which we could upgrade to but still couldn't find it, so I assume you may be talking about something that's in current which we couldn't risk on this machine. Is this something that's possible on 5.x / 6.2 or something that will need a lot of work? Regards Steve ----- Original Message ----- From: "Dag-Erling Smørgrav" 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 = "pqrsPQRS"; src/sys/kern/tty_pty.c: * pts == /dev/tty[pqrsPQRS][0123456789abcdefghijklmnopqrstuv] src/sys/kern/tty_pty.c: * ptc == /dev/pty[pqrsPQRS][0123456789abcdefghijklmnopqrstuv] src/contrib/telnet/telnetd/sys_term.c: for (cp = "pqrsPQRS"; *cp; cp++) { src/usr.sbin/ac/ac.c: strchr("pqrsPQRS", usr.ut_line[3]) != 0 || src/lib/libutil/pty.c: for (cp1 = "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) DES -- Dag-Erling Smørgrav - des@des.no ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.