Thread (12 messages) flat view 12 messages, 5 authors, 2016-06-15

Re: [PATCH 2/2] Remember and use GIT_EXEC_PATH on exec()'s

From: Alex Riesen <hidden>
Date: 2016-06-15 22:42:16

Possibly related (same subject, not in this thread)

Andreas Ericsson, Tue, Jan 10, 2006 20:13:34 +0100:
quoted
My shell's rc-file doesn't get invoked when using ssh as a transport;
that's part of the problem.
It does for me and everybody else. $HOME/.bashrc is read even for 
non-interactive shells. ...
Not really:

$ man bash

       When bash is started non-interactively, to  run  a  shell  script,  for
       example, it looks for the variable BASH_ENV in the environment, expands
       its value if it appears there, and uses the expanded value as the  name
       of  a  file to read and execute.  Bash behaves as if the following com-
       mand were executed:
              if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
       but the value of the PATH variable is not used to search for  the  file
       name.

$ ssh host2 strace -e open bash -c :
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libncurses.so.5", O_RDONLY)  = 3
open("/lib/tls/libdl.so.2", O_RDONLY)   = 3
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE) = -1 ENXIO (No such device or address)
open("/etc/mtab", O_RDONLY)             = 3
open("/proc/meminfo", O_RDONLY)         = 3
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help