[Nagios-devel] Proposal for ePN patch. Sanity check.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Proposal for ePN patch. Sanity check.

Post by Guest »

Dear Gentlemen,

I am writing to request your comments on an approach for dealing with
the problems embedding Perl in Nag brought about by Perl 5.8.0.

Background:

Any application that wants to embed Perl must have a preamble text
before main().

This preamble is given by perl -MExtUtils::Embed -e xsinit -- -o -.

Problem:

The preamble differs for different Perl versions, and for a Threaded
Perl 5.8.0 the preamble needs to be augmented by the Patch from Suse
(the one sent by Mr Galstad to a couple of folks for successfull
trial).

This patch is vital to prevent a SEGV at nag startup (I think that Perl
redefines reentrant versions of some system functions; the patch
undefines them).

Suggested solution:

1 Add a new PERLVER="`perl -e 'print substr($] * 100, 0, 3)'`" to
configure.in

2 Add this as a -D value to COPTS in the Makefile or add it to config.h

(I don't know how the code manages to define EMBEDDEDPERL, so it
probably should use the existing mechanism whatever that is).

3 Replace the existing Perl related defines to something like

#ifdef EMBEDDEDPERL
#if PERLVER == 580

.. Suse patch

#elif PERLVER == 560 || PERLVER == 561

.. 5.6.x xsinit()

#else

.. 5.005_03 xsinit()

#endif
#endif

Unfortunately there needs to be further defines for threaded Perls
throught the rest of the code.

Please let me know if

. this approach is sensible

. are you able to test

(probably starting and compiling are all thats necessary to test)

especially on threaded systems; I may have access to threaded Solaris
Perls but all the FreeBSD hosts have threadless Perls (even though multi
threaded apps like ntop work fine).

Yours sincerely.

--
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: Stanley.Hopcroft@IPAustralia.Gov.AU
Locked