You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2015/04/22 19:05:28 UTC

svn commit: r1675419 - in /tcl/rivet/branches/2.2: ChangeLog doc/xml/internals.xml

Author: mxmanghi
Date: Wed Apr 22 17:05:28 2015
New Revision: 1675419

URL: http://svn.apache.org/r1675419
Log:
    * doc/xml/internals.xml: replaced reference to the old configure.tcl script
    and replaced with up-to-date directions on how to build with the debugger
    using the current autotools based scripts


Modified:
    tcl/rivet/branches/2.2/ChangeLog
    tcl/rivet/branches/2.2/doc/xml/internals.xml

Modified: tcl/rivet/branches/2.2/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.2/ChangeLog?rev=1675419&r1=1675418&r2=1675419&view=diff
==============================================================================
--- tcl/rivet/branches/2.2/ChangeLog (original)
+++ tcl/rivet/branches/2.2/ChangeLog Wed Apr 22 17:05:28 2015
@@ -1,3 +1,8 @@
+2015-04-22 Massimo Manghi <mx...@apache.org>
+    * doc/xml/internals.xml: replaced reference to the old configure.tcl script
+    and replaced with up-to-date directions on how to build with the debugger
+    using the current autotools based scripts
+
 2015-04-16 Massimo Manghi <mx...@apache.org>
     * docs/xml/install.xml: removed documentation for obsolete
     configure switch --with-apache-version

Modified: tcl/rivet/branches/2.2/doc/xml/internals.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.2/doc/xml/internals.xml?rev=1675419&r1=1675418&r2=1675419&view=diff
==============================================================================
--- tcl/rivet/branches/2.2/doc/xml/internals.xml (original)
+++ tcl/rivet/branches/2.2/doc/xml/internals.xml Wed Apr 22 17:05:28 2015
@@ -13,81 +13,81 @@
     <section>
       <title>Initialization</title>
       <para>
-	When Apache is started, (or when child Apache processes are
-	started if a threaded Tcl is used),
-	<function>Rivet_InitTclStuff</function> is called, which
-	creates a new interpreter, or one interpreter per virtual
-	host, depending on the configuration. It also initializes
-	various things, like the <structname>RivetChan</structname>
-	channel system, creates the Rivet-specific Tcl commands, and
-	executes Rivet's <filename>init.tcl</filename>.  The caching
-	system is also set up, and if there is a
-	<command>GlobalInitScript</command>, it is run.
+			When Apache is started, (or when child Apache processes are
+			started if a threaded Tcl is used),
+			<function>Rivet_InitTclStuff</function> is called, which
+			creates a new interpreter, or one interpreter per virtual
+			host, depending on the configuration. It also initializes
+			various things, like the <structname>RivetChan</structname>
+			channel system, creates the Rivet-specific Tcl commands, and
+			executes Rivet's <filename>init.tcl</filename>.  The caching
+			system is also set up, and if there is a
+			<command>GlobalInitScript</command>, it is run.
       </para>
     </section>
     <section>
       <title>RivetChan</title>
       <para>
-	The <structname>RivetChan</structname> system was created in
-	order to have an actual Tcl channel that we could redirect
-	standard output to.  This lets us use, for instance, the
-	regular <command>puts</command> command in .rvt pages.  It
-	works by creating a channel that buffers output, and, at
-	predetermined times, passes it on to Apache's IO system.
-	Tcl's regular standard output is replaced with an instance of
-	this channel type, so that, by default, output will go to the
-	web page.
+			The <structname>RivetChan</structname> system was created in
+			order to have an actual Tcl channel that we could redirect
+			standard output to.  This lets us use, for instance, the
+			regular <command>puts</command> command in .rvt pages.  It
+			works by creating a channel that buffers output, and, at
+			predetermined times, passes it on to Apache's IO system.
+			Tcl's regular standard output is replaced with an instance of
+			this channel type, so that, by default, output will go to the
+			web page.
       </para>
     </section>
     <section>
       <title>The <command>global</command> Command</title>
       <para>
-	Rivet aims to run standard Tcl code with as few surprises as
-	possible.  At times this involves some compromises - in this
-	case regarding the <command>global</command> command.  The
-	problem is that the command will create truly global
-	variables.  If the user is just cut'n'pasting some Tcl code
-	into Rivet, they most likely just want to be able to share the
-	variable in question with other procs, and don't really care
-	if the variable is actually persistant between pages.  The
-	solution we have created is to create a proc
-	<command>::request::global</command> that takes the place of
-	the <command>global</command> command in Rivet templates.  If
-	you really need a true global variable, use either
-	<command>::global</command> or add the :: namespace qualifier
-	to variables you wish to make global.
+			Rivet aims to run standard Tcl code with as few surprises as
+			possible.  At times this involves some compromises - in this
+			case regarding the <command>global</command> command.  The
+			problem is that the command will create truly global
+			variables.  If the user is just cut'n'pasting some Tcl code
+			into Rivet, they most likely just want to be able to share the
+			variable in question with other procs, and don't really care
+			if the variable is actually persistant between pages.  The
+			solution we have created is to create a proc
+			<command>::request::global</command> that takes the place of
+			the <command>global</command> command in Rivet templates.  If
+			you really need a true global variable, use either
+			<command>::global</command> or add the :: namespace qualifier
+			to variables you wish to make global.
       </para>
     </section>
     <section>
       <title>Page Parsing, Execution and Caching</title>
       <para>
-	When a Rivet page is requested, it is transformed into an
-	ordinary Tcl script by parsing the file for the &lt;? ?&gt;
-	processing instruction tags.  Everything outside these tags
-	becomes a large <command>puts</command> statement, and
-	everything inside them remains Tcl code.
-      </para>
-      <para>
-	Each .rvt file is evaluated in its own
-	<constant>::request</constant> namespace, so that it is not
-	necessary to create and tear down interpreters after each
-	page.  By running in its own namespace, though, each page will
-	not run afoul of local variables created by other scripts,
-	because they will be deleted automatically when the namespace
-	goes away after Apache finishes handling the request.
-      <note>
-	    One current problem with this system is that while
-	    variables are garbage collected, file handles are not, so
-	    that it is very important that Rivet script authors make
-	    sure to close all the files they open.
-      </note>
-      </para>
-      <para>
-    	After a script has been loaded and parsed into it's "pure Tcl"
-    	form, it is also cached, so that it may be used in the future
-    	without having to reload it (and re-parse it) from the disk.
-    	The number of scripts stored in memory is configurable.  This
-    	feature can significantly improve performance.
+			When a Rivet page is requested, it is transformed into an
+			ordinary Tcl script by parsing the file for the &lt;? ?&gt;
+			processing instruction tags.  Everything outside these tags
+			becomes a large <command>puts</command> statement, and
+			everything inside them remains Tcl code.
+      </para>
+      <para>
+			Each .rvt file is evaluated in its own
+			<constant>::request</constant> namespace, so that it is not
+			necessary to create and tear down interpreters after each
+			page.  By running in its own namespace, though, each page will
+			not run afoul of local variables created by other scripts,
+			because they will be deleted automatically when the namespace
+			goes away after Apache finishes handling the request.
+	      <note>
+		    One current problem with this system is that while
+		    variables are garbage collected, file handles are not, so
+		    that it is very important that Rivet script authors make
+		    sure to close all the files they open.
+	      </note>
+      </para>
+      <para>
+	    	After a script has been loaded and parsed into it's "pure Tcl"
+	    	form, it is also cached, so that it may be used in the future
+	    	without having to reload it (and re-parse it) from the disk.
+	    	The number of scripts stored in memory is configurable.  This
+	    	feature can significantly improve performance.
       </para>
     </section>
     <section>
@@ -192,30 +192,45 @@ mycmd->1</programlisting>
 
       <programlisting>strace -o /tmp/outputfile -S 1000 httpd -X</programlisting>
 
-      <para>This command will run httpd in the system call tracer,
-	which leaves its output (there is potentially a lot of it) in
-	<filename>/tmp/outputfile</filename>.  The <option>-S</option>
-	option tells <command></command>strace to only record the
-	first 1000 bytes of a syscall.  Some calls such as
-	<function>write</function> can potentially be much longer than
-	this, so you may want to increase this number.  The results
-	are a list of all the system calls made by the program.  You
-	want to look at the end, where the failure presumably occured,
-	to see if you can find anything that looks like an error.  If
-	you're not sure what to make of the results, you can always
-	ask on the Rivet development mailing list.
-      </para>
-
       <para>
-	If <command>strace</command> (or its equivalent on your
-	operating system) doesn't answer your question, it may be time
-	to debug Apache and Rivet.  To do this, you will need to run
-	the <command>./configure.tcl</command> script with the
-	<option>-enable-symbols</option> option, and recompile.
+      	This command will run httpd in the system call tracer,
+			which leaves its output (there is potentially a lot of it) in
+			<filename>/tmp/outputfile</filename>.  The <option>-S</option>
+			option tells <command></command>strace to only record the
+			first 1000 bytes of a syscall.  Some calls such as
+			<function>write</function> can potentially be much longer than
+			this, so you may want to increase this number.  The results
+			are a list of all the system calls made by the program.  You
+			want to look at the end, where the failure presumably occured,
+			to see if you can find anything that looks like an error.  If
+			you're not sure what to make of the results, you can always
+			ask on the Rivet development mailing list.
       </para>
+
       <para>
-	Since it's easier to debug a single process, we'll still run
-	Apache in single process mode with -X:
+			If <command>strace</command> (or its equivalent on your
+			operating system) doesn't answer your question, it may be time
+			to debug Apache and Rivet.  To do this, you will need to rebuild mod_rivet.
+			First of all you have to configure the build by running the
+			<command>./configure</command> script with the
+			<option>-enable-symbols</option> option and after you have
+			set the CFLAGS and LDFLAGS environment variables
+      </para>
+      <programlisting>export CFLAGS="-g -O0"
+export LDFLAGS="-g"
+./configure --enable-symbols ......
+make
+make install</programlisting>
+		<para>
+			Arguments to <command>./configure</command> must fit your Apache HTTP
+			web server installation. See the output produced by
+		</para>
+		<programlisting>./configure --help</programlisting>
+		<para>
+			And check the <xref linkend="installation">installation</xref> page to
+			have further information.
+			Since it's easier to debug a single process, we'll still run
+			Apache in single process mode with -X:
       </para>
 
       <programlisting>



---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org