Re: perl_alloc or perl_clone?

2005-11-21 Thread Stas Bekman
JD Brennan wrote: Currently, I'm doing: char *args[] = { "jperl", perlfile }; int argcount = 2; PerlInterpreter* my_perl = perl_alloc(); PERL_SET_CONTEXT(my_perl); perl_construct(my_perl); PERL_SET_CONTEXT(my_perl); int status = perl_parse(my_perl, xs_init, argcount, args, NULL); ...

RE: perl_alloc or perl_clone?

2005-11-18 Thread JD Brennan
Currently, I'm doing: char *args[] = { "jperl", perlfile }; int argcount = 2; PerlInterpreter* my_perl = perl_alloc(); PERL_SET_CONTEXT(my_perl); perl_construct(my_perl); PERL_SET_CONTEXT(my_perl); int status = perl_parse(my_perl, xs_init, argcount, args, NULL); ... PERL_SET_CONTEXT(m

Re: perl_alloc or perl_clone?

2005-11-18 Thread Stas Bekman
[JD, please keep the thread on the list. Thanks] JD Brennan wrote: Stas Bekman wrote: I'm not familiar with activeperl, but perl_clone and perl_alloc aren't the same thing. You must run perl_clone if you want to start an ithread. So what are the tradeoffs/advantages of perl_

Re: perl_alloc or perl_clone?

2005-11-18 Thread Stas Bekman
I'm wondering if switching to perl_clone() instead of perl_alloc() would help. I haven't totally narrowed it down yet, but it's crashing in one of these 3 routines: perl_alloc() perl_construct() perl_parse() Apache modperl2 uses perl_clone(). Doesn't seem there is much advanta

perl_alloc or perl_clone?

2005-11-18 Thread JD Brennan
switching to perl_clone() instead of perl_alloc() would help. I haven't totally narrowed it down yet, but it's crashing in one of these 3 routines: perl_alloc() perl_construct() perl_parse() Apache modperl2 uses perl_clone(). Doesn't seem there is much advantage to it, and it

perl_clone

2002-12-08 Thread Brian De Pradine
Hello, Does anyone know the details of the flags to use with perl_clone? I had a look at the perl sources for 5.8.0 and I found the following: CLONEf_COPY_STACKS 1 CLONEf_KEEP_PTR_TABLE 2 CLONEf_CLONE_HOST 4 Does anyone know when it is appropriate to use each of these? Thanks Brian

Re: Proposed addition to perl_clone, different root of cloning

2001-07-10 Thread Gurusamy Sarathy
On Tue, 10 Jul 2001 14:23:55 +0200, Artur Bergman wrote: > >I think it would be nice to be able to specify the root of where perl_clone >will clone the data structure. Good, this was always the idea. >For a thread there is no point in cloning whatever the start sub does not >se

Proposed addition to perl_clone, different root of cloning

2001-07-10 Thread Artur Bergman
I think it would be nice to be able to specify the root of where perl_clone will clone the data structure. For a thread there is no point in cloning whatever the start sub does not see (*). Or maybe you just want to clone a certain amount of packages. For a safe compartment you might want to

Re: [PATCH] Added callback CLONE to perl_clone.

2001-06-07 Thread Artur Bergman
heir internal state. If the > extension exports a C routine (not XS) called clone_Foo (akin to > bootstrap_Foo) that function will be called by perl_clone() > with two arguments: the new interpreter that is being created, > and the "private data" of that extension. This als

Re: [PATCH] Added callback CLONE to perl_clone.

2001-06-06 Thread Gurusamy Sarathy
bootstrap_Foo) that function will be called by perl_clone() with two arguments: the new interpreter that is being created, and the "private data" of that extension. This also needs some conventions/support established in xsubpp to declare the "private data" in

[PATCH] Added callback CLONE to perl_clone.

2001-06-06 Thread Artur Bergman
Hi, This is a patch that calls CLONE on all blessed objects that support it during a perl_clone. The reason we need to collect the objects is because the enviroment is not setup correctly during sv_dup! If somone would like to point me where to look to extend this support to call it on classes