Bug#486069: perl: embedding perl hangs on hppa without PERL_SYS_INIT3() since 5.10.0
Julien ÉLIE
julien at trigofacile.com
Sat Jun 28 19:37:58 UTC 2008
Hi Russ,
>> I do not know whether PERL_SYS_INIT3() is in Perl 5.004_03 (as INN is said
>> to compile with it).
>
> Hm, yeah, it may not be around before Perl 5.8, even. You could try
> checking with #ifdef before calling it, since the capital letters would
> imply it's a macro.
All right. It works fine with #ifdef.
>> /* We can't call 'eval' and 'do' directly for some reason, so we define
>> some wrapper functions to give us access. */
>
> I wish I could remember all the investigation I did of this at some point.
> I figured out what the problem was and how to fix it, and then I didn't
> write it down. :/
Cleanfeed is working fine (innd filter) but nnrpd filters does not.
When I send an article, there is no answer: my news reader keeps waiting.
And if I stop posting the article, it is suddenly processed by nnrpd and
correctly posted (but my news reader still has it in its "items to send").
>> + /* The Perl expression which will be evaluated. */
>> + asprintf(&evalfile, "do %s", startupfile);
>
> You need some quoting here of the file and in any other similar place.
> That may be the problem.
That was indeed a problem. The filter is now correctly embedded:
Jun 28 21:00:49 news innd: SERVER Python filtering enabled
(Perl does a "eval { do 'filter_innd.pl' };" if I understand well the structure.)
> I'm not *sure* on this, but this possibly should be perl_eval_pv to be
> safer (although either probably works). I don't remember exactly how the
> namespacing works when embedding.
They say:
eval_pv
Tells Perl to eval the given string and return an SV* result.
NOTE: the perl_ form of this function is deprecated.
But probably I should put perl_eval_pv for backward compatibility with previous
Perl versions.
+ asprintf(&evalfile, "eval undef &%s", function);
+ eval_pv(evalfile, TRUE);
It might be changed to only "undef &%s" because eval_pv does the evaluation I think.
But the posting issue is still here with that change.
--
Julien ÉLIE
« En fait, je n'ai qu'une prétention, c'est de ne pas
plaire à tout le monde. Plaire à tout le monde, c'est plaire
à n'importe qui. » (Sacha Guitry)
More information about the inn-workers
mailing list