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

Re: [PATCH] Do not use SHELL_PATH from build system in prepare_shell_cmd on Windows

From
Ben Walton <bwalton@artsci.utoronto.ca>
Date
Apr 17, 2012, 13:45 UTC
Message-ID
<1334670128-sup-4966@pinkfloyd.chass.utoronto.ca>
In-Reply-To
<4F8D15B9.70803@viscovery.net>
Excerpts from Johannes Sixt's message of Tue Apr 17 03:03:21 -0400 2012:
Hi Hannes,
> The recent change to use SHELL_PATH instead of "sh" to spawn shell
> commands is not suited for Windows:
Ah yes, I can see how that would be undesirable on Windows.
Show 6 quoted lines
> +#ifndef WIN32
>          nargv[nargc++] = SHELL_PATH;
> +#else
> +        nargv[nargc++] = "sh";
> +#endif
>          nargv[nargc++] = "-c";

A minor style question: Would this conditional code not be better if it were up where the fallback SHELL_PATH is set? That would leave this code block #ifdef free while still avoiding the breakage on Windows.

Admittedly, it's a very minor point and possibly entirely a personal preference.

Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302

Previous: Johannes SixtNext: Johannes Sixt
Message 8 of 16 in “Use SHELL_PATH from build system in run_command.c:prepare_shell_cmd”
  1. Use SHELL_PATH from build system in run_command.c:prepare_shell_cmdBen Walton, Mar 31, 2012
  2. Jonathan NiederMar 31, 2012
  3. Junio C HamanoMar 31, 2012
  4. Jonathan NiederMar 31, 2012
  5. Junio C HamanoMar 31, 2012
  6. Junio C HamanoMar 31, 2012
  7. Do not use SHELL_PATH from build system in prepare_shell_cmd on WindowsJohannes Sixt, Apr 17, 2012
  8. Ben WaltonApr 17, 2012
  9. Johannes SixtApr 17, 2012
  10. Ben WaltonApr 17, 2012
  11. Jeff KingApr 17, 2012
  12. Johannes SixtApr 18, 2012
  13. Jeff KingApr 18, 2012
  14. Junio C HamanoApr 18, 2012
  15. Johannes SixtApr 19, 2012
  16. Junio C HamanoApr 19, 2012

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.