fixed to clear environment variables when clearenv() is not available
This commit is contained in:
parent
bc9d849b8a
commit
8f7dcbe479
@ -1282,7 +1282,10 @@ static int cgi_peer_on_fork (mio_dev_pro_t* pro, void* fork_ctx)
|
|||||||
#if defined(HAVE_CLEARENV)
|
#if defined(HAVE_CLEARENV)
|
||||||
clearenv ();
|
clearenv ();
|
||||||
#else
|
#else
|
||||||
putenv ("environ=NULL");
|
{
|
||||||
|
extern char** environ;
|
||||||
|
if (environ) environ[0] = '\0';
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (path) setenv ("PATH", path, 1);
|
if (path) setenv ("PATH", path, 1);
|
||||||
if (lang) setenv ("LANG", lang, 1);
|
if (lang) setenv ("LANG", lang, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user