Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Oct 2007 16:29:42 +0100
From:      "Steven Hartland" <killing@multiplay.co.uk>
To:        =?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
Cc:        freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org
Subject:   Re: How to enable more than 256 pty's?
Message-ID:  <032f01c80509$0ddc8720$b6db87d4@multiplay.co.uk>
References:  <001f01c80407$1358d490$b6db87d4@multiplay.co.uk><00ab01c8040c$7c408160$b6db87d4@multiplay.co.uk><012101c804e5$efa7e9c0$b6db87d4@multiplay.co.uk> <86abr1yb68.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
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" <des@des.no>

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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?032f01c80509$0ddc8720$b6db87d4>