On Mon, Apr 21, 2014 at 7:49 AM, Adam Thompson <athom...@athompso.net> wrote:
> On 14-04-21 09:36 AM, Philip Guenther wrote:
>>
>> Hmm, I haven't seen anything like that in many many years. $ENV used to be
>> processed by non-interactive scripts, but that was a bug fixed in 2007. I
>> would be interested in hearing details of specific cases where .profile is
>> parsed by non-terminal software.
>
> I have developers using Ant deploy scripts that SSH into the target host
> repeatedly, once for every build step.  Ant does a reasonably good job of
> emulating a terminal and handling strangeness in the output, but it's still
> clearly "non-terminal software".

I don't understand: if it's it's invoking ssh in a way that gives it a
pty on the remote side, then the stty's aren't a problem.  If it's
not, then it must be explicitly going out of its way to get a login
shell without pty.  Lacking the "why we did this" of doing, I don't
see what problem it would be the correct solution for.


> There's no reasonable way (that I'm aware of) for Ant to *not* cause a login
> shell to occur when operating in this mode.



> Many non-terminal things can process .profile: GDM & KDM, I believe, still
> do so.  Not sure about XDM.
>
> I believe that's not exactly what you meant... I agree that the standard use
> case of:
>     .profile - login shells only
>     $ENV - interactive shells only
> is still appropriate.
>
> This generally means, IIRC, that environment variables (ironically, given
> the name "$ENV") should go into .profile, but things that screw with the
> terminal should go into $ENV instead.
>
> Funny - I know intuitively where I want to put different things, but
> actually writing it down and coming up with a clear set of guidelines is
> surprisingly hard.  That probably means my knowledge is incomplete.
>
> --
> -Adam Thompson
>  athom...@athompso.net

Reply via email to