mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-24 19:51:11 +00:00
hurd: Fix spawni SPAWN_XFLAGS_TRY_SHELL with empty argv
When argv is empty, we need to add the original script to be run on the shell command line.
This commit is contained in:
parent
13adfa34af
commit
a39b95b975
@ -842,6 +842,10 @@ __spawni (pid_t *pid, const char *file,
|
||||
{
|
||||
/* The file is accessible but it is not an executable file.
|
||||
Invoke the shell to interpret it as a script. */
|
||||
err = 0;
|
||||
if (!argslen)
|
||||
err = __argz_insert (&args, &argslen, args, relpath);
|
||||
if (!err)
|
||||
err = __argz_insert (&args, &argslen, args, _PATH_BSHELL);
|
||||
if (!err)
|
||||
err = child_lookup (_PATH_BSHELL, O_EXEC, 0, &execfile);
|
||||
|
Loading…
Reference in New Issue
Block a user