$0 under ePN
Gavin Carr
gavin at openfusion.com.au
Tue Aug 29 13:59:31 CEST 2006
On Mon, Aug 21, 2006 at 02:03:27AM -0400, sean finney wrote:
> On Mon, Aug 21, 2006 at 02:48:19PM +1000, Gavin Carr wrote:
> > Under ePN $0 contains the full path to the ePN interpreter (e.g.
> > /usr/local/bin/p1.pl) instead of the path to the currently running
> > plugin. This makes it difficult for plugins that want to determine
> > how they were invoked in order to present different personalities.
> >
> > 1. modify nagios to set an environment variable before it invokes
> > the plugin (or ePN) containing the full path to the plugin
> > e.g. NAGIOS_PLUGIN or some such
>
> i think that within epn is probably the best place to fix this, since
> it's only a problem from within epn.
>
> i'm guessing that epn doesn't do fork/exec at all, so it would be
> hard to "trick" the plugin by overwriting $0. perhaps what you
> suggest would be a good approach wrt setting an environment variable
> and doing some automatic setting in the perl plugin module.
>
> > 2. workaround the issue in p1.pl for ePN only (see e.g. the attached
> > one-line patch to p1.pl)
Any other thoughts on this? Do people agree with Sean that it's
probably better restricted to ePN than using a more general solution?
Ethan, are you happy to apply that one line patch to p1.pl in my
original email, if so?
Cheers,
Gavin
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
More information about the Developers
mailing list