Comment 3 for bug 979259

Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

mod_perl itself will return OK to Apache for us when the scalar return value of child_init() is undef. See

src/modules/perl/modperl_callback.c line 112 as of r1420856 in mod_perl's SVN repo.

Granted this is mainly meant to support a thing that replaces exit() in order to ease the shoehorning of Perl scripts that call exit() into mod_perl environments, but it has the same effect if we just call a bare 'return' in handlers. Some of our child_init handlers implicitly returned 1 or other values as side-effects of the final statements in them, but those pass through unchanged to Apache, which doesn't do anything with them.

This seems like gold plating. However, if it doesn't hurt anything, and if the work has already been done to be more "correct" along the lines of recommendations like the one here, http://modperlbook.org/html/25-2-1-3-PerlChildInitHandler.html , I'll merge it just to get it off the list of open bugs.

Merged to master and backported through rel_2_2.