Bug#486069: perl: embedding perl hangs on hppa without PERL_SYS_INIT3() since 5.10.0
Russ Allbery
rra at stanford.edu
Sat Jun 28 01:05:08 UTC 2008
Julien ÉLIE <julien at trigofacile.com> writes:
> According to
>
> http://perldoc.perl.org/perlembed.html
>
> there is also PERL_SYS_TERM() to add after having closed the Perl
> interpreter.
Indeed.
> As for PERL_SYS_INIT3(), I do not know whether it is really necessary
> for us and if we also need to use it during the execution of the code.
> There are perl_call_argv() calls for instance with arguments.
I'm fairly sure that you only have to call it once when you first
initialize the Perl interpretor. It should be called before perl_alloc.
> I can apply something like that. Please tell me if it looks fine.
Looks good to me.
> void PERLsetup (char *startupfile, char *filterfile, const char *function)
> {
> if (PerlCode == NULL) {
> + int argc = 5;
> + const char *argv[] = { "innd",
> + "-e", "sub _load_ { do $_[0] }",
> + "-e", "sub _eval_ { eval $_[0] }",
> + NULL };
This stuff is a hack that isn't actually necessary, incidentally. eval_pv
is the right way to call arbitrary Perl code and will let us call do and
eval directly. I never got around rewriting things to use that, though.
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers
mailing list