[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Avoid sourcing bashrc when connected to sockets
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: Avoid sourcing bashrc when connected to sockets |
Date: |
Mon, 14 Feb 2022 00:46:31 +0100 |
if it says bashrc read --norc as suggested
On Sun, Feb 13, 2022, 20:56 Andrew Gregory <andrew.gregory.8@gmail.com>
wrote:
> The pacman package manager runs install scripts by forking and invoking a
> compile-time configured shell by calling "<shell> -c '. <path-to-script>;
> <operation> <args>'", e.g. "bash -c '. /tmp/.INSTALL; pre_install
> pacman'". A
> while back we switched from using pipes to sockets to communicate with the
> fork
> in order to avoid SIGPIPE problems. Unfortunately, this makes bash think
> it's
> being run under rsh/ssh and it now reads ~/.bashrc, which can break
> scripts.
> Can the rsh/ssh check be modified to ignore this case? Or, if it can't
> (which
> I assume is the case), what can we do to avoid this behavior in a way least
> likely to cause problems when pacman is compiled with a shell other than
> bash?
>
> Thanks,
> apg
>
>