| |||
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 aroundAnway 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.
| |||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |