git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Ben Walton <bwalton@artsci.utoronto.ca>
Cc: peff@peff.net, j.sixt@viscovery.net, gitster@pobox.com,
	git@vger.kernel.org
Subject: Re: [PATCH] Use SHELL_PATH from build system in run_command.c:prepare_shell_cmd
Date: Fri, 30 Mar 2012 22:48:02 -0500	[thread overview]
Message-ID: <20120331034802.GB2475@burratino> (raw)
In-Reply-To: <1333157601-6458-1-git-send-email-bwalton@artsci.utoronto.ca>

Ben Walton wrote:

> During the testing of the 1.7.10 rc series on Solaris for OpenCSW, it
> was discovered that t7006-pager was failing
[...]
> --- a/run-command.c
> +++ b/run-command.c
> @@ -4,6 +4,10 @@
>  #include "sigchain.h"
>  #include "argv-array.h"
>  
> +#ifndef SHELL_PATH
> +# define SHELL_PATH "/bin/sh"
> +#endif
> +
>  struct child_to_clean {
>  	pid_t pid;
>  	struct child_to_clean *next;
> @@ -90,7 +94,7 @@ static const char **prepare_shell_cmd(const char **argv)
>  		die("BUG: shell command is empty");
>  
>  	if (strcspn(argv[0], "|&;<>()$`\\\"' \t\n*?[#~=%") != strlen(argv[0])) {
> -		nargv[nargc++] = "sh";
> +		nargv[nargc++] = SHELL_PATH;

The underlying problem is an old one.  Thanks for fixing it.

For what it's worth,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

[...]
> Essentially, the shell is a
> special case of tool that should not rely on SANE_TOOL_PATH and must
> be called explicitly.

It is probably annoying to hear me say this, but:

The above doesn't tell me _why_ it is a special case and that on
Solaris users have been burned by "sh" being the original Bourne shell
or a temperamental version of ksh so SHELL_PATH usually points to bash
or ksh93 instead.

I trust the reader enough to fill in the blank, though, so I think the
patch is ok as is.

  reply	other threads:[~2012-03-31  3:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7vvclmoit6.fsf@alter.siamese.dyndns.org>
2012-03-31  1:33 ` [PATCH] Use SHELL_PATH from build system in run_command.c:prepare_shell_cmd Ben Walton
2012-03-31  3:48   ` Jonathan Nieder [this message]
2012-03-31  5:38     ` Junio C Hamano
2012-03-31  5:55   ` Jonathan Nieder
2012-03-31 17:49     ` Junio C Hamano
2012-03-31 18:04       ` Junio C Hamano
2012-04-17  7:03   ` [PATCH] Do not use SHELL_PATH from build system in prepare_shell_cmd on Windows Johannes Sixt
2012-04-17 13:45     ` Ben Walton
2012-04-17 14:00       ` Johannes Sixt
2012-04-17 14:04         ` Ben Walton
2012-04-17 22:14     ` Jeff King
2012-04-18  5:39       ` Johannes Sixt
2012-04-18  7:27         ` Jeff King
2012-04-18 16:30         ` Junio C Hamano
2012-04-19  5:36           ` Johannes Sixt
2012-04-19  5:49             ` Junio C Hamano
2012-03-28  4:22 [PATCH] Use SHELL_PATH to fork commands in run_command.c:prepare_shell_cmd Jeff King
2012-03-28 23:26 ` [PATCH] Use SHELL_PATH from build system " Ben Walton
2012-03-29  4:02   ` Junio C Hamano
2012-03-29  6:09     ` Jonathan Nieder
     [not found]     ` <1333073831-sup-5734@pinkfloyd.chass.utoronto.ca>
2012-03-30  6:32       ` Jonathan Nieder
2012-03-29 23:00   ` Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120331034802.GB2475@burratino \
    --to=jrnieder@gmail.com \
    --cc=bwalton@artsci.utoronto.ca \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).