Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: [PATCH v2] Fix false positives in t3404 due to SHELL=/bin/false

From: Robin H. Johnson <hidden>
Date: 2016-06-15 22:50:19

Possibly related (same subject, not in this thread)

On Tue, Jan 04, 2011 at 09:43:12AM -0500, Vallon, Justin wrote:
 # "exec" commands are ran with the user shell by default, but this may
 # be non-POSIX. For example, if SHELL=zsh then ">file" doesn't work
 # to create a file. Unseting SHELL avoids such non-portable behavior

Perl's exec and system do not use SHELL (as far as perlfunc states).  It uses
/bin/sh -c "$cmd", or a platform-dependent equivalent.

$SHELL is typically only used when a program wants to invoke a user-shell
(ie: editor shell-escape, xterm, typescript, screen).

How was SHELL=/bin/false causing problems?  Is git using $SHELL?
git-rebase--interactive.sh:
====
${SHELL:-@SHELL_PATH@} -c "$rest" # Actual execution
status=$?
if test "$status" -ne 0
then
	warn "Execution failed: $rest"
====

This always triggers with SHELL=/bin/false if SHELL is unset or empty,
SHELL_PATH gets substituted, which tends to be the correct /bin/sh.

-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help