Pseudoterminals increase: compilation error

Dan Nelson dnelson at
Sat Jul 19 21:56:11 UTC 2008

In the last episode (Jul 19), Unga said:
> On Sat, 7/19/08, Peter Jeremy  wrote:
> > On 2008-Jul-18 18:38:36 -0700, Unga wrote:
> > >As per FAQ,
> > >,
> > > I tried to increase the number of ptys: "10.19.1 Build and
> > > install a new kernel with the line in the configuration file:
> > > device pty N where N is the number of requested pseudoterminals."
> > 
> > That has been obsolete for a while.  Do you actually have a problem
> > with insufficient PTYs?
> Looks like, may not be.
> The Problem: 
> expect -c "spawn ls"
> spawn ls
> The system has no more ptys.  Ask your system administrator to create
>  more. while executing "spawn ls"
> It now seems to be a permission problem as explained in
> .
> Still investigating. Any help will be very much appreciated.

Expect's error message doesn't say anything except "something isn't
working but I won't tell you what".  Run

truss -o truss.log -f expect -c "spawn ls" 

and determine which syscall is failing, with what error number, just
before expect prints its "no more ptys" message.  That will tell you
whether it's a permissions issue, or something else.  If there are no
obvious errors, post a part of the log.

Also, what version of expect are you running?  Versions between
5.38.0_1 and 5.43.0_2 had a bug in the port Makefile that limited the
number of ptys expect could see.  See .

	Dan Nelson
	dnelson at

More information about the freebsd-stable mailing list