How to increase the max pty's on Freebsd 7.0?

Steven Hartland killing at multiplay.co.uk
Wed Apr 1 11:29:26 PDT 2009


I knew his sounded very familiar, seems I asked the same
question back in 2007 for 5.4 just it was capped at 256:
http://lists.freebsd.org/mailman/htdig/freebsd-hackers/2007-October/021852.html

I'm sure I also remember saying this limit had been removed in 7.x
but looking in the source for pqrsPQRS it seems there are several
places where this still hard coded:-

contrib/telnet/telnetd/sys_term.c:      for (cp = "pqrsPQRS"; *cp; cp++) {
lib/libc/stdlib/grantpt.c:#define       PTY_DEV1        "pqrsPQRSlmnoLMNO"
lib/libutil/pty.c:      for (cp1 = "pqrsPQRSlmnoLMNO"; *cp1; cp1++) {
sys/kern/tty_pty.c:static const char names[] = "pqrsPQRSlmnoLMNOtuvwTUVWxyzXYZ";
sys/kern/tty_pty.c: * pts == /dev/tty[pqrsPQRSlmnoLMNO][0123456789abcdefghijklmnopqrstuv]
sys/kern/tty_pty.c: * ptc == /dev/pty[pqrsPQRSlmnoLMNO][0123456789abcdefghijklmnopqrstuv]
usr.sbin/ac/ac.c:                                   strchr("pqrsPQRS", usr.ut_line[3]) != 0 ||

So the questions are:-
1. Is the fix to this still to just to update these settings?
2. Is there any significance to the upper case lower case thing?
3. Are there any other restrictions on the letters that can be used?

----- Original Message ----- 
From: "Steven Hartland"

> How can I increase the maximum number or ptys available on FreeBSD 7.0?
> 
> It seems that currently the machine is maxing out at 512 but there is
> still loads of capacity left on the machine.
> 
> Ideally would like to double at least the number of ttys available,
> any help would be most appreciated.


================================================
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 at multiplay.co.uk.



More information about the freebsd-hackers mailing list