FreeBSD 6.0 default pty/tty-limit (256) OFF!

Robert Watson rwatson at FreeBSD.org
Sun Jan 22 15:53:21 PST 2006


On Sat, 21 Jan 2006, Mikko Työläjärvi wrote:

>> I need patch to raise FreeBSD 6.0 default pty/tty-limit (256) UP or OFF. In 
>> shell-production usage, that limit is ridiculous, there must be stop to 
>> this and put PTY-limits off! I changed my servers operating systems moment 
>> ago from Linux to FreeBSD thinking that FreeBSD could be more better, but 
>> how this can be possible, that so important think like PTYs are limited to 
>> so low?? every UNIX has more ptys.
>
> This is a long standing problem, as is evident from kern/25866 [1] from 
> 2001.  A more recent report is standards/90896 [2], wich also contains a 
> patch.
>
> I'd suggest you try the patch and provide feedback to the bug report.

FYI, there's also a tty_pts.c floating around, based on some work I did at 
McAfee a couple of years ago, that implements /dev/ptmx and /dev/pts for 
FreeBSD.  Among other things, it removes the limit on the number pty's, and 
adopts the Sys V pty naming convention.  While there are upsides and downsides 
to the naming convention, it does attempt to normalize the way we handle 
pty's, as well as removing the requirement for root privilege in order to 
allocate and properly protect a pty.  I have an older version at 
http://www.watson.org/~robert/freebsd/pts/.  However, it's fairly dated, and 
may not work due to other changes since it was written (I've not looked to 
see).  I've tried several times to trick developers into picking it up and 
doing the last remaining work to make it real -- largely what's required is 
work on the forward/backward compatibility issue, that and extensive testing 
and a security audit.  It would be nice to ship 7.x with these changes as it 
would resolve a lot of problems.

Robert N M Watson


More information about the freebsd-hackers mailing list