This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

External script taking too long to execute?

Help for those learning Tcl or writing their own scripts.
Post Reply
e
elal
Voice
Posts: 1
Joined: Wed Aug 19, 2009 7:58 pm

External script taking too long to execute?

Post by elal »

I am writing a TCL script for the eggdrop bot. The primary function of this TCL script is to call an external BASH script. The BASH script takes a variable amount of time to execute, because it must first download software, and sometimes that software is rather large.

During those times when the BASH script is downloading a large file, there appears to be some sort of time-out issue, because the TCL script never produces any result to the channel. The external BASH script succeeds, but its output never reaches the TCL script which called it.

During those times when the bash script is only downloading *small* files, the output from the bash script reaches the TCL caller, and everything is fine.

Is anyone familiar with external script timeouts in eggdrop/TCL scripts?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Your best option would be to use the "open" command with pipes. This allows you to interact with the stdin/stdout pipes of your script as if it was any ordinary file, while at the same time the script will not block tcl (and thus not eggdrop either).
NML_375
Post Reply