[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash is interactive despite -c option?
From: |
cpr |
Subject: |
Re: bash is interactive despite -c option? |
Date: |
Fri, 06 Jun 2003 14:05:00 -0400 |
----- Original Message -----
From: "Paul D. Smith" <psmith@gnu.org>
Date: Friday, June 6, 2003 1:29 pm
Subject: Re: bash is interactive despite -c option?
> %% cpr@cwru.edu writes:
>
> c> However, bash-2.05 (by default) and bash-2.05[ab] (if
> compiled with
> c> SSH_SOURCE_BASHRC defined in config-top.h) will read and execute
> c> commands from ~/.bashrc if the shell thinks it's a top-level
> shell c> being executed by sshd.
>
> c> Apparently the conditions under which you're running gnu make are
> c> convincing bash that it's being run by sshd.
>
> Hm, interesting. What are the conditions bash looks at to make this
> decision?
0. The `-c' option is used, we're not running as `sh', we're not interactive,
and we're
not a login shell.
1. $SSH_CLIENT or $SSH2_CLIENT is set
2. The file descriptor attached to standard input is a socket or other network
connection.
3. $SHLVL is < 2, indicating we're the first bash in the process tree.
Chet
>
> Thanks.
>
> --
> -------------------------------------------------------------------
> ------------
> Paul D. Smith <psmith@gnu.org> Find some GNU make tips at:
> http://www.gnu.org http://make.paulandlesley.org
> "Please remain calm...I may be mad, but I am a professional." --
> Mad Scientist
>