Re: [Nagios-devel] Patch for nagios.c/embedded Perl support: HUP no longer calls init_embedded_perl() and friends.

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

Re: [Nagios-devel] Patch for nagios.c/embedded Perl support: HUP no longer calls init_embedded_perl() and friends.

Post by Guest »

Thanks - will be in CVS soon.

On 20 May 2005 at 14:14, Stanley Hopcroft wrote:

> Dear Folks,
>
> Please find below a patch against the 2.x CVS of the last 10 days.
>
> The object is embedded Perl support.
>
> The intent is to avoid the
>
> 1 surge of memory use by the Nagios process
>
> 2 increased rate of memory use by the Nagios process
>
> after sending a hangup signal.
>
> Prior to this patch, I would reconfigure and then activate the changes
> by a restart (stop/start).
>
> The patched code does not call init_embedded_per() and
> deinit_embedded_perl() when sigrestart is true (set by the HUP
> sighandler in utils.c).
>
> A patched copy has been running here for the last 24 hours and been
> hupped a few times in that period.
>
> Yours sincerely.
>
>
>
> tsitc> diff -u nagios.c.orig nagios.c
> --- nagios.c.orig Thu May 19 22:25:29 2005
> +++ nagios.c Thu May 19 22:28:11 2005
> @@ -576,7 +576,8 @@
>
> /* initialize embedded Perl interpreter */
> #ifdef EMBEDDEDPERL
> - init_embedded_perl(env);
> + if(sigrestart==FALSE)
> + init_embedded_perl(env);
> #else
> init_embedded_perl(NULL);
> #endif
> @@ -721,7 +722,8 @@
> close_command_file();
>
> /* cleanup embedded perl interpreter */
> - deinit_embedded_perl();
> + if(sigrestart==FALSE)
> + deinit_embedded_perl();
>
> /* cleanup worker threads */
> shutdown_service_result_worker_thread();
> tsitc>
>
>
>



Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked