At 03:10 AM 4/4/2002, you wrote:

>Question for you guys:
>
>I'm working on a module for 2.0, which generates content (with Tcl).
>In 1.3, prior to setting things in motion, I did a
>
>ap_chdir_file(r->filename);
>
>to have everything running in the right place.  In 2.0, because of the
>threading, this doesn't strike me as being such a good idea.
>
>What might be an effective strategy for running a script in a known
>place on the filesystem?  Put a mutex on everything?  Yuck...

apr_proc_create allows you to set up the cwd and all, it deals with
the threaded/non-threaded aspects based on the flavor built.  But it
may be more optimal to a cgid mechanism.  [Note your approach,
using the apr_proc_ and apr_procattr_ api's to set the cwd - will work
just fine on Win32 and some other threaded platforms.]  It's more of
a hassle, but it may be the only way to have a seperate process
churning your scripts.

Bill


Reply via email to