Corinna Vinschen
2010-Feb-19 17:37 UTC
[PATCH/cygwin] reduce number of propagated environment variables
Hi, could somebody apply the below patch, please? It removes a couple of environment variables which are propagated to the child process so far, but which not really necessary to keep child processes running. What's left now is the bare minimum which is requested by scripts, typically. Thanks, Corinna Index: openbsd-compat/bsd-cygwin_util.c ==================================================================RCS file: /cvs/openssh/openbsd-compat/bsd-cygwin_util.c,v retrieving revision 1.21 diff -u -p -r1.21 bsd-cygwin_util.c --- openbsd-compat/bsd-cygwin_util.c 8 Mar 2009 00:40:28 -0000 1.21 +++ openbsd-compat/bsd-cygwin_util.c 19 Feb 2010 17:35:28 -0000 @@ -85,23 +85,14 @@ static struct wenv { size_t namelen; } wenv_arr[] = { { NL("ALLUSERSPROFILE=") }, - { NL("COMMONPROGRAMFILES=") }, { NL("COMPUTERNAME=") }, { NL("COMSPEC=") }, { NL("CYGWIN=") }, - { NL("NUMBER_OF_PROCESSORS=") }, { NL("OS=") }, { NL("PATH=") }, { NL("PATHEXT=") }, - { NL("PROCESSOR_ARCHITECTURE=") }, - { NL("PROCESSOR_IDENTIFIER=") }, - { NL("PROCESSOR_LEVEL=") }, - { NL("PROCESSOR_REVISION=") }, - { NL("PROGRAMFILES=") }, { NL("SYSTEMDRIVE=") }, { NL("SYSTEMROOT=") }, - { NL("TMP=") }, - { NL("TEMP=") }, { NL("WINDIR=") } }; -- Corinna Vinschen Cygwin Project Co-Leader Red Hat
Roumen Petrov
2010-Feb-19 21:26 UTC
[PATCH/cygwin] reduce number of propagated environment variables
Hi Corinna, Corinna Vinschen wrote:> Hi, > > could somebody apply the below patch, please? It removes a couple of > environment variables which are propagated to the child process so far, > but which not really necessary to keep child processes running. What's > left now is the bare minimum which is requested by scripts, typically. > > > Thanks, > Corinna > > > Index: openbsd-compat/bsd-cygwin_util.c > ==================================================================> RCS file: /cvs/openssh/openbsd-compat/bsd-cygwin_util.c,v > retrieving revision 1.21 > diff -u -p -r1.21 bsd-cygwin_util.c > --- openbsd-compat/bsd-cygwin_util.c 8 Mar 2009 00:40:28 -0000 1.21 > +++ openbsd-compat/bsd-cygwin_util.c 19 Feb 2010 17:35:28 -0000 > @@ -85,23 +85,14 @@ static struct wenv { > size_t namelen; > } wenv_arr[] = { > { NL("ALLUSERSPROFILE=") }, > - { NL("COMMONPROGRAMFILES=") }, > { NL("COMPUTERNAME=") }, > { NL("COMSPEC=") }, > { NL("CYGWIN=") }, > - { NL("NUMBER_OF_PROCESSORS=") }, > { NL("OS=") }, > { NL("PATH=") }, > { NL("PATHEXT=") }, > - { NL("PROCESSOR_ARCHITECTURE=") }, > - { NL("PROCESSOR_IDENTIFIER=") }, > - { NL("PROCESSOR_LEVEL=") }, > - { NL("PROCESSOR_REVISION=") }, > - { NL("PROGRAMFILES=") }, > { NL("SYSTEMDRIVE=") }, > { NL("SYSTEMROOT=") }, > - { NL("TMP=") }, > - { NL("TEMP=") }, > { NL("WINDIR=") } > }; > >Why TMP and TEMP are in the list for removal ? Some open-source project may use TMP . What is impact if PROCESSOR_* is removed ? Did you test as example with python ? Roumen