ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-tk
perl-tk
Re: Perl/TK limits
by Slaven Rezic other posts by this author
May 1 2003 5:19PM messages near this date
V 0.1 patches for pTk 8.4.0a | Re: Perl/TK limits
"Ferguson, Duncan" <Duncan.Ferguson@[...].com>  writes:

>  The console is a perl/tk widget with a couple of menus and an Entry widget
>  with a few bindings set up on it.  Every time a key is pressed it drops into
>  a func that replicates that key press to all the open file handles.
>  
>  I can open as many xterms as I want without a problem (we have the limit set
>  at 256), but the console window only appears if I have less than 15 of them
>  opened from the perl script.
>  
>  The script works by calling it with a list of hostnames, i.e. cssh s1 s2 s3
>  s4 s5 s6
>  Then the script forks itself, and the children exec into xterm connections
>  to the servers while the parent
>  works out the controlling terminal of all the children, opens a filehandle
>  to each of them, and stores the info in a hash.
>  Then, every time a key is pressed the hash is walked and the key sent to
>  each file handle of the child.
>  
>  As I say, this all works until I have more than 14 children, then the parent
>  refuses to show until a enough children are closed to get under the 14
>  limit.
>  
>  I have been looking at this for a few weeks and got no-where...
>  

The subject is about "Perl/Tk limits" and I don't see anything
appliable here, other than X11 server or OS limits. Are you using
fileevent()? Can you make the problem appear in a minimal script and
post this script to the list?

Regards,
	Slaven


>    Duncs
>  
>  -- 
>  
>  
>  
>  -----Original Message-----
>  From: Slaven Rezic [mailto:slaven@[...].de] 
>  Sent: 01 May 2003 15:09
>  To: Ferguson, Duncan
>  Cc: 'ptk@lists.stanford.edu'
>  Subject: Re: Perl/TK limits
>  
>  
>  "Ferguson, Duncan" <Duncan.Ferguson@[...].com> writes:
>  
>  > I seem to have hit a limit of some kind while using Perl(5.6.1)/TK(8.0) on
>  > Solaris 2.6 and I would like to extend it.
>  > 
>  > I have written a small program that will open up a number of xterm
>  sessions
>  > to a number of servers, and then opens up a small console window.  If you
>  > type into the console window it replicates the text into all xterm
>  windows,
>  > or you can type directly into one of the xterms (I grab all of the input
>  > file handles from the xterms and store them all in a hash so then I can
>  grab
>  > the input from the console, cycle through all of the connections and write
>  > out the input to each of the xterms)
>  > 
>  > Everything works perfectly until I try to open up more than 14 sessions.
>  > All the sessions start, MainLoop is entered, and the console window
>  doesn't
>  > open.  If I close 1 of the xterm sessions then the console opens up fine
>  and
>  > all works as before.
>  > 
>  > It appears as though there may be a limit of 16 file handles on my perl/tk
>  > script, and the console GUI needs 2 of them before it will open.  The
>  > session I start the perl in has no limits applied (certainly not this
>  small,
>  > anyhow).
>  > 
>  > What and where might this limit be, and how can I increase it?  I cannot
>  > find any reference to this type of thing in the FAQ, modules or manuals.
>  > 
>  
>  It is not clear to me what your console window looks like. Is it a
>  "xterm -C", or built from a Perl/Tk widget, e.g. a Tk::Text widget?
>  There are certainly limits how many xterms (or pseudo ttys at all) can
>  be created. On my system it's about 24. If it's more, I get "xterm: no
>  available ptys: No such file or directory" errors.
>  
>  Regards,
>  	Slaven
>  
>  -- 
>  Slaven Rezic - slaven@[...].de
>  
>      tksm - Perl/Tk program for searching and replacing in multiple files
>      http://ptktools.sourceforge.net/#tksm
>  
>  
>  This private and confidential e-mail has been sent to you by Egg.
>  The Egg group of companies includes Egg Banking plc
>  (registered no. 2999842), Egg Financial Products Ltd (registered
>  no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
>  carries out investment business on behalf of Egg and is regulated
>  by the Financial Services Authority.  
>  Registered in England and Wales. Registered offices: 1 Waterhouse Square,
>  138-142 Holborn, London EC1N 2NA.
>  If you are not the intended recipient of this e-mail and have
>  received it in error, please notify the sender by replying with
>  'received in error' as the subject and then delete it from your
>  mailbox.
>  
>  -++**==--++**==--++**==--++**==--++**==--++**==--++**==
>  This message was posted through the Stanford campus mailing list
>  server.  If you wish to unsubscribe from this mailing list, send the
>  message body of "unsubscribe ptk" to majordomo@[...].edu
>  

-- 
Slaven Rezic - slaven@[...].de

    tktimex - project time manager
    http://sourceforge.net/projects/ptktools/
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@lists.stanford.edu
Thread:
Slaven Rezic
Sean Kamath
Darren Dunham

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved