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)
|
||||
clearenv ();
|
||||
#else
|
||||
putenv ("environ=NULL");
|
||||
{
|
||||
extern char** environ;
|
||||
if (environ) environ[0] = '\0';
|
||||
}
|
||||
#endif
|
||||
if (path) setenv ("PATH", path, 1);
|
||||
if (lang) setenv ("LANG", lang, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user