Hi Massimo,

In fact I am running rivet with SeparateVirtualInterps set to off.

I init the DB connections and sockets in the ServerInitScript, and access
global arrays and objects in rivet pages.
So I guess this was working because I had only 1 interpreter.

Now if I set the SeparateVirtualInterps to on, the open log error is not
triggered, so the jail environment is working fine.
But I can't access my global variables anymore. What is the best way to do
that?

Also is Rivet 3.0.0 in a stable form worth a try?

Thank you,
Brice.


On Tue, Mar 1, 2016 at 8:52 AM, Massimo Manghi <[email protected]>
wrote:

> Hi
>
> On 02/29/2016 09:23 PM, Brice Hamon wrote:
>
>>
>> Ok here is some facts:
>>
>> When apache is started, and Rivet gets loaded, it calls the
>> RivetInitChildScript.
>>
>> In this script, I init all DB connections, open some TCP sockets, and
>> generate a log file under /tmp. This is working. and a log file is
>> created under the /tmp/xxxxxxxj/tmp/mylog and no error is thrown.
>>
>> Now in a vhost rivet's page, I also open the same log file than in
>> the RivetInitChildScript but this time this fails with an access denied.
>>
>> Seems like when I am in a rivet page, I am still in a jail environment
>> which in that case I should, but for some reason the /tmp from an open
>> file TCL command is not chroot to the jail location.
>>
>> Odd no ?
>>
>>
>>
> Do you run rivet with SeparateVirtualInterps? It makes sense you do
> otherwise there is no difference between virtual hosts from the point of
> view of a Tcl interpreter. If I'm correct and you are actually running
> rivet with SeparateVirtualInterps then the only difference between virtual
> hosts is the Tcl interpreter is a slave of master Tcl interpreter. I don't
> know if slave Tcl interpreter can be set to change the way [open] works ,
> but after all slave interpreter were introduced with the purpose of having
> safe interpreters, so some implications might exist.
>
> Rivet 3.0.0 instead creates only top level Tcl interpreters for each
> virtual host. Apparently you are running prefork with your server. The
> module should load the prefork bridge automatically and if my hypotheses is
> correct you should see something different
>
> I recommend you check with Reinhard and ask how Tcl on SUSE is built
> (especially regarding slave interpreters)
>
>  -- Massimo
>

Reply via email to