This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

env -i specialities on cygwin


If one wantÂs to start a new process without an environment, env -i will be
the choice.
In the cygwin enviroment this leads to problems if /bin or /usr/bin are not
added to the PATH in the new process. In this case the cygwin1.dll is not
in the path and will not be found be the process that just tries to start.
This is true for all other DLLs that may be used by the cygwin executable.

There are two options to avoid this:
1) Modify all shell scripts that use env -i to include /usr/bin in the PATH
when porting appications to cygwin. This means lots of manual work since
shell scripts are often not considered to be dynamic in autoconf/automake
runs.
2) Modify the env binary to always include /usr/bin to the path, even if
the -i switch is specified. But this will not just allow access to the DLLs
but to all executables in the same directory. This may raise security
problems.

A third solution would be to have all cygwin DLLs in a separate directory
where no executables reside. But this would be a more dramatic change to
the distribution.

Any comments are welcome!

Regards,
Christian


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]