[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Avoid sourcing bashrc when connected to sockets
From: |
Andrew Gregory |
Subject: |
Avoid sourcing bashrc when connected to sockets |
Date: |
Sun, 13 Feb 2022 11:55:55 -0800 |
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
- Avoid sourcing bashrc when connected to sockets,
Andrew Gregory <=
- Re: Avoid sourcing bashrc when connected to sockets, Kerin Millar, 2022/02/13
- Re: Avoid sourcing bashrc when connected to sockets, Alex fxmbsw7 Ratchev, 2022/02/13
- Re: Avoid sourcing bashrc when connected to sockets, Chet Ramey, 2022/02/14
- Re: Avoid sourcing bashrc when connected to sockets, Chet Ramey, 2022/02/21
- Re: Avoid sourcing bashrc when connected to sockets, Andrew Gregory, 2022/02/21