env-util.c revision 8fa0258c986f227c159576eeb2a7c2fcb191a90e
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "env-util.h"
#include <stdlib.h>
{
2048);
}
}
void env_clean(void)
{
#ifdef HAVE_CLEARENV
if (clearenv() < 0)
i_fatal("clearenv() failed");
#else
extern char **environ;
/* Try to clear the environment.
a) environ = NULL crashes on OS X.
b) *environ = NULL doesn't work on FreeBSD 7.0.
c) environ = emptyenv appears to work everywhere.
*/
#endif
/* don't clear the env_pool, otherwise the environment would get
corrupted if we failed to clear it. */
}