2.0b1 on Solaris
Andreas Ericsson
ae at op5.se
Fri Jan 14 16:44:02 CET 2005
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]; i++) free(environ[i]);
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: nagios at nagios.org
> 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
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
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
More information about the Developers
mailing list