> That's the problem with your latest patch. You should not unselect the
> interp before you finish the callback. Nested calls to select are NOOPs
> (i.e. they figure out that the interpreter was already selected and
> won't do it again), same goes for unselect. So you need to move that
> unselect untill after _run:
ok, that makes sense. (duh).
> Now, given that the select code is run anyway inside the callback, just
> take the select/unselect parts out of if (MpDirSETUP_ENV(dcfg)), similar
> to perl-script.
I don't see where parts are removed for perl-script versus what I had. but
I think I see how the MpInterpPUTBACK stuff can be removed in the modperl
handler, since you only need context for the call to
modperl_env_request_populate and the callback does another full
select/rcfg->interp population later. is that what you meant?
> With the fix above, yes. I haven't read through the rest of the patch,
> assuming that it's the same as the previous one.
it was different in that it incorporated your other comments (which is why I
posted the whole thing :)
--Geoff
Index: src/modules/perl/mod_perl.c
===================================================================
RCS file: /home/cvspublic/modperl-2.0/src/modules/perl/mod_perl.c,v
retrieving revision 1.206
diff -u -r1.206 mod_perl.c
--- src/modules/perl/mod_perl.c 10 Jan 2004 05:01:04 -0000 1.206
+++ src/modules/perl/mod_perl.c 12 Feb 2004 21:55:33 -0000
@@ -837,11 +837,40 @@
int modperl_response_handler(request_rec *r)
{
+ MP_dDCFG;
+ apr_status_t retval;
+
+#ifdef USE_ITHREADS
+ pTHX;
+ modperl_interp_t *interp;
+#endif
+
if (!strEQ(r->handler, "modperl")) {
return DECLINED;
}
- return modperl_response_handler_run(r, TRUE);
+ /* default is -SetupEnv, add if PerlOption +SetupEnv */
+ if (MpDirSETUP_ENV(dcfg)) {
+#ifdef USE_ITHREADS
+ interp = modperl_interp_select(r, r->connection, r->server);
+ aTHX = interp->perl;
+#endif
+
+ modperl_env_request_populate(aTHX_ r);
+ }
+
+ retval = modperl_response_handler_run(r, TRUE);
+
+ if (MpDirSETUP_ENV(dcfg)) {
+#ifdef USE_ITHREADS
+ if (MpInterpPUTBACK(interp)) {
+ /* PerlInterpScope handler */
+ modperl_interp_unselect(interp);
+ }
+#endif
+ }
+
+ return retval;
}
int modperl_response_handler_cgi(request_rec *r)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]