ssh + patch + $TMP

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Mon Feb 22 21:16:00 GMT 2010


On Mon, Feb 22, 2010 at 10:15:21AM +0100, Corinna Vinschen wrote:
>On Feb 22 01:53, Christopher Faylor wrote:
>> On Sun, Feb 21, 2010 at 05:33:56PM -0800, Karl M wrote:
>> >
>> >> Date: Sat, 20 Feb 2010 21:23:22 -0500
>> >> From: cgf
>> >> Subject: Re: ssh + patch + $TMP
>> >>
>> >> On Sun, Feb 21, 2010 at 12:04:19AM +0100, Cyrille Lefevre wrote:
>> >>
>> >> I would really bet that there aren't many programs out there which rely
>> >> on those environment variables. Just asserting that this is needed
>> >> doesn't really advance the conversation at all since you're just a lone
>> >> voice with no credentials which would give your opinion weight. If
>> >> you have specific examples then please provide them.
>> >>
>> >> If this was truly like linux then I believe that most, if not all, of
>> >> the environment would come from settings in the shell itself. So, in
>> >> thinking about this more, I think we could probably get away with
>> >> deleting everything.
>> >>
>> >> If someone wanted to run a program which relied on those variables they
>> >> could always set them themselves.
>> >>
>> >Although, we do inherit the windows environment when launching a Cygwin
>> >bash shell, so I wouldn't carry this argument to an extreme.
>> 
>> It's not the same thing.  If we really had a getty/login processes like
>> linux we would control the environment precisesly.  In the case of sshd
>> we're close to the way linux does things.  There is a daemon running
>> which starts a shell via sshd.
>
>As you noticed above, on all other platforms sshd does not pass on most
>of it's own environment variables to the child process.  Only a minimal
>set of env vars is created at all, USER, LOGNAME, HOME, PATH, MAIL, SHELL,
>TZ, and only TZ is passed on from the parent.
>
>The idea here is to do almost the same on Cygwin, just passing on a
>minimal set of variables to keep cmd.exe running.

AFAIK, with the exception of PATH, cmd.exe doesn't need any environment
variables to run.  If you're going to second-guess what applications run
by cmd.exe need then there is no reason to assume that all of them
aren't important for something.  If we're going to accommodate what we
think people need for cmd.exe then maybe we shouldn't be removing
anything.

cgf

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



More information about the Cygwin mailing list