Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
Expect: system only has a finite number of ptys

Posted by zyren98 (zyren98), 11 October 2005
I have a tcl/expect script(in Solaris) to ftp/telnet to 20 workstations,but got always error msg around 15 workstations:
application-specific initialization failed: The system only has a finite number of ptys and you have ma
ny of them in use.  The usual reason for this is that you forgot (or didn't know) to call "wait" after closing each of them
And did put wait after all "exit\r or quit\r"
Looks tcl keep counting all used ptys,instead current one,right?any idea for this problem?

Posted by admin (Graham Ellis), 11 October 2005
It does sound rather as if the processes haven't been closed / reaped properly and you may have some zombies around.  I doubt that Tcl / Expect is counting ptys, as they're going to be spawned process specific ... and I've quite happily pinged batches of machines checking an entire C class network in the past.

You say "the current one". Can I take it from this that you're only making one connection at a time?   If so, it might be a good idea to pause the Expect process when you've supposeldly completed and released a connection and see if utilities like ps still know about it.

Posted by zyren98 (zyren98), 11 October 2005
Thanks,I double checked the pts which spawned by TCL/expect,released in ps for sure;but TCL still treated them connected somehow;so I got to only use once spawn,then used send ftp/telnet to go to remained workstations as a work around
Anway appreciated your quick response


Posted by admin (Graham Ellis), 11 October 2005
Did you check the list of information returned by your wait?  The third element tells you success (0) or failure (-1).

Posted by zyren98 (zyren98), 12 October 2005
third are 0 for wait ftp/telnet;but forth is 0 for ftp spawn,1 for telnet spawn,any comments?

Posted by admin (Graham Ellis), 12 October 2005
That indicates that all the processes are said to have successfully terminated, but that the telnet process has had some sort of problem as it ran; that's where I would look further ....

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2022: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho