On Mon, May 23, 2005 at 06:19:21PM +0100, Stuart Children wrote:

> I'm trying to understand the lifecycle of a TCL interpreter in
> AOLserver, in order to be aware of how variables persist and so avoid
> issues that might cause - as well as potentially take advantage of any
> useful features.

> Certainly trial-and-error does seem to indicate that variables set
> within a template do not persist across requests (ignoring nsv_*), and

What do you mean by "a template"?  An ADP page?  An OpenACS Templating
System Tcl/ADP pair?  Something else?

> that namespace-specific variables set during initialisation are visible
> during template execution - tying in with what's suggested about cloning
> a post-startup interpreter's state. The exception being global variables
> which appear to be completely cleared down before each template is
> executed - even if they were set during server startup.

I'm not aware of any completely definitive docs on those issues.  If
you find or write some, please do let us know.  :)

The simple view of things you already know; it ignores the tricky edge
cases and memory cleanup implementation details, and fortunately seems
to suffice nicely for everything other than integrating 3rd party
tools into AOLserver.

In the meantime, here are a few relevant list threads:

Jim D. did indeed add extensive Tcl interp comments to
"nsd/tclinit.c", which he mentioned here:

  http://www.mail-archive.com/[email protected]/msg08776.html

A bunch of stuff about variable persistence and risks of memory leaks
in AOLserver is buried throughout this tDOM thread:

  http://www.mail-archive.com/[email protected]/msg08706.html

Me complaining about / advocating for AOLserver internals design and
implementation docs:

  http://www.mail-archive.com/[email protected]/msg08493.html

> Two other (unrelated) questions: Firstly, it appears that when parsing
> ADP, if a TCL error is encountered during a <%...%> block, AOLserver
> simply logs the error, that block is replaced with an empty string in
> the output (or the contents of 'errorpage' if set), and execution of the
> rest of the ADP continues. My question is whether there's a way to
> configure AOLserver such that execution terminates as soon as a TCL

If I remember right, Jim Davidson provided some such method a while
back.  More info should be in the list archives.

--
Andrew Piskorski <[EMAIL PROTECTED]>
http://www.piskorski.com/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to