Question about the env

Igor Sysoev igor at
Fri Nov 12 22:44:32 MSK 2010

On Fri, Nov 12, 2010 at 10:18:54PM +0300, Igor Sysoev wrote:

> On Fri, Nov 12, 2010 at 02:09:11AM -0500, speedfirst wrote:
> > Hey, I noticed that the "env" directive in the main module is not an
> > equivalent of "export" in bash or "putenv" in C stdlib. The variables
> > defined by "env" seems only can be used by the embeded Perl module,
> > right? 
> Not only.
> For example, "env OPENSSL_ALLOW_PROXY_CERTS=1;" controls OpenSSL.
> "env MALLOC_OPTIONS;" controls FreeBSD malloc().

However, setting FreeBSD MALLOC_OPTIONS using "env" is useless, because
malloc() analyzes MALLOC_OPTIONS on the very start before event main()
is called. Nevertheless "env MALLOC_OPTIONS;" is useful during online
upgrade: a new nginx is run with inherited MALLOC_OPTIONS.

Igor Sysoev

More information about the nginx mailing list