mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 19:41:15 -03:00
The ability to switch to sh for processing files starting with a ':' broke
recently, as the incorrect arguments were being passed to execve. The function went through the trouble of creating the proper arguments, and then failed to use them. darcs-hash:20080104015631-2d839-1d79a7810fcc3e2a3788dabdbc22d13a4bd4f404.gz
This commit is contained in:
5
exec.c
5
exec.c
@@ -485,6 +485,7 @@ static void launch_process( process_t *p )
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
int i = 1;
|
int i = 1;
|
||||||
wchar_t **res;
|
wchar_t **res;
|
||||||
|
char **res_real;
|
||||||
|
|
||||||
while( p->argv[count] != 0 )
|
while( p->argv[count] != 0 )
|
||||||
count++;
|
count++;
|
||||||
@@ -501,9 +502,11 @@ static void launch_process( process_t *p )
|
|||||||
res[i+1] = 0;
|
res[i+1] = 0;
|
||||||
p->argv = res;
|
p->argv = res;
|
||||||
p->actual_cmd = L"/bin/sh";
|
p->actual_cmd = L"/bin/sh";
|
||||||
|
|
||||||
|
res_real = wcsv2strv( (const wchar_t **) res);
|
||||||
|
|
||||||
execve ( wcs2str(p->actual_cmd),
|
execve ( wcs2str(p->actual_cmd),
|
||||||
argv,
|
res_real,
|
||||||
envv );
|
envv );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user