bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: bash is interactive despite -c option?


From: David Thompson
Subject: RE: bash is interactive despite -c option?
Date: Fri, 6 Jun 2003 10:43:23 -0700

> -----Original Message-----
> From: cpr@cwru.edu [mailto:cpr@cwru.edu]
> I cannot reproduce this with bash-2.05 or 2.05[ab].
> 
> However, bash-2.05 (by default) and bash-2.05[ab] (if compiled with
> SSH_SOURCE_BASHRC defined in config-top.h) will read and execute
> commands from ~/.bashrc if the shell thinks it's a top-level shell
> being executed by sshd.
> 
> Apparently the conditions under which you're running gnu make are
> convincing bash that it's being run by sshd.

Ah, interestingly, using ksh93 exec -c to clear the environment
shows correct results,

    $ cat ~/.bashrc
    echo Hello bashrc

    $ ksh -c '/bin/bash -c pwd'
    Hello bashrc
    /home/davidt

    $ ksh -c 'exec -c /bin/bash -c pwd'
    /home/davidt

Since I used ssh to login, I now have some clue.  I'll
proceed to download the bash sources and lookup the code
dealing with SSH_SOURCE_BASHRC.  Perhaps bash is confused
by presence of some ssh environment variable(s)?

Regards,

--
David Thompson
Foster City, CA




reply via email to

[Prev in Thread] Current Thread [Next in Thread]