On 05/16, Jeff King wrote:
> On Wed, May 17, 2017 at 11:15:43AM +0900, Junio C Hamano wrote:
>
> > > + if (errno == ENOEXEC)
> > > + execv(argv.argv[0], (char *const *) argv.argv);
> >
> > "/bin/sh" tries to run "/usr/bin/git" that was not executable (well,
> > the one in
Jeff King writes:
> This is about finding "/usr/bin/foo", realizing it cannot be exec'd
> because it lacks a shebang line, and then pretending that it did have
> "#!/bin/sh". IOW, maintaining compatibility with execvp().
>
> So the command itself isn't a shell command, but it may execute a shell
On Tue, May 16, 2017 at 10:26:02PM -0400, Jeff King wrote:
> On Wed, May 17, 2017 at 11:15:43AM +0900, Junio C Hamano wrote:
>
> > > + if (errno == ENOEXEC)
> > > + execv(argv.argv[0], (char *const *) argv.argv);
> >
> > "/bin/sh" tries to run "/usr/bin/git" that was not
On Wed, May 17, 2017 at 11:15:43AM +0900, Junio C Hamano wrote:
> > + if (errno == ENOEXEC)
> > + execv(argv.argv[0], (char *const *) argv.argv);
>
> "/bin/sh" tries to run "/usr/bin/git" that was not executable (well,
> the one in "usr/bin/" would have +x bit, but let
Brandon Williams writes:
> @@ -238,6 +238,12 @@ static void prepare_cmd(struct argv_array *out, const
> struct child_process *cmd)
> if (!cmd->argv[0])
> die("BUG: command is empty");
>
> + /*
> + * Add SHELL_PATH so in the event exec fails with ENOEXEC we can
> +
Convert the function used to exec from 'execvp()' to 'execv()' as the (p)
variant of exec isn't async-signal-safe and has the potential to call malloc
during the path resolution it performs. Instead we simply do the path
resolution ourselves during the preparation stage prior to forking. There al
6 matches
Mail list logo