Re: [Nagios-devel] 2.0b1 on Solaris

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] 2.0b1 on Solaris

Post by Guest »

Ethan Galstad wrote:
> Mark Anderson submitted (un)setenv replacement code recently, but I
> think it would be better to use the native (un)setenv() calls when
> available and back off to putenv() when needed. I'll make a CVS
> commit shortly with this. The putenv() call will leak memory, but
> only in child processes, and that should get cleaned up by the OS
> when they exit.
>

Even if ...

for(i=0; environ; i++) free(environ);
environ = NULL;

... ? It should be safe to free all of it and null it out at the end of
execution, since symbols are already resolved.

I haven't researched or tested, but perhaps extern char **environ; isn't
available on all too many systems.

> On 13 Jan 2005 at 11:07, local.coder wrote:
>
>
>>Ethan,
>>
>>Been a while but I was upgrading a system and ran into an issue on
>>2.0b1 on Solaris. Basically Solaris does not have setenv and unsetenv
>>it has putenv but the arguments are different. This is only called
>>once in utils.c so I wanted to find out from you how critical these
>>are as to whether putenv can be tweaked for use or if the two calls
>>can be ifdef'd to not be used on solaris.
>>
>>Thanks,
>>Derrick
>
>
>
> Ethan Galstad,
> Nagios Developer
> ---
> Email: [email protected]
> Website: http://www.nagios.org
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Nagios-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-devel
>

--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Lead Developer





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