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 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
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?
Thanks
Scott


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

Scott

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 www.opentalk.org.uk 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., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho