git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Robin H. Johnson <robbat2@gentoo.org>
Date
Jan 4, 2011, 20:35 UTC
Message-ID
<robbat2-20110104T203312-513011947Z@orbis-terrarum.net>
In-Reply-To
<982E526FA742C94E9AC26DA766FD07090A3399@NYCMBX3.winmail.deshaw.com>
On Tue, Jan 04, 2011 at 09:43:12AM -0500, Vallon, Justin wrote:
Show 11 quoted lines
>  # "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
Previous: Vallon, JustinNext: Matthieu Moy
Message 6 of 11 in “Fix false positives in t3404 due to SHELL=/bin/false”
  1. Fix false positives in t3404 due to SHELL=/bin/falseRobin H. Johnson, Dec 27, 2010
  2. Junio C HamanoDec 27, 2010
  3. Fix false positives in t3404 due to SHELL=/bin/falseRobin H. Johnson, Dec 27, 2010
  4. Junio C HamanoDec 28, 2010
  5. Vallon, JustinJan 4, 2011
  6. Robin H. JohnsonJan 4, 2011
  7. Matthieu MoyJan 4, 2011
  8. Jonathan NiederJan 4, 2011
  9. Junio C HamanoJan 4, 2011
  10. Vallon, JustinJan 5, 2011
  11. Junio C HamanoJan 5, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.