PDA

View Full Version : [iTCL] change default script timeout via function


mentality
06-08-2005, 11:09 AM
is there a way to change the amount of time a script can run without printing to console? or a way to keep a script running longer without output to console? atm, after 60(?) seconds, the connection will be lost, which is fine for most scripts, but i need a way to disable this from itcl for a script.

i know there used to be a setting in .ini (or there was no timeout, cant remeber exactly)

thanks.

neoxed
06-08-2005, 01:44 PM
Originally posted by mentality
is there a way to change the amount of time a script can run without printing to console?Tcl scripts running from within ioFTPD do not have a 'console'. There is no way to change the default script-execution timeout (nor was there ever). In one of the major 5.x beta releases, this timeout was introduced.

However, there are tricks to extend the timeout. External applications can repeatedly write "no-op" commands to stdout and flush the channel (i.e. printf("!buffer off\n"); fflush(stdout); ). Tcl applications can use 'iputs -nobuffer <message>'. Both of these methods must be performed continually or on regular intervals before the timeout value.

I believe darkone mentioned that he would change the script-execution timeouts for the next ioFTPD beta release (don't quote me on this, though).

mentality
06-08-2005, 06:17 PM
aye, ive already implimented iputs -nobuffer "message" to keep (in effect) script active.

just a bit messy tho..

cheers.