mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-17 06:33:46 +08: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:
parent
063c4d7e67
commit
564d19e3bd
5
exec.c
5
exec.c
|
@ -485,6 +485,7 @@ static void launch_process( process_t *p )
|
|||
int count = 0;
|
||||
int i = 1;
|
||||
wchar_t **res;
|
||||
char **res_real;
|
||||
|
||||
while( p->argv[count] != 0 )
|
||||
count++;
|
||||
|
@ -501,9 +502,11 @@ static void launch_process( process_t *p )
|
|||
res[i+1] = 0;
|
||||
p->argv = res;
|
||||
p->actual_cmd = L"/bin/sh";
|
||||
|
||||
res_real = wcsv2strv( (const wchar_t **) res);
|
||||
|
||||
execve ( wcs2str(p->actual_cmd),
|
||||
argv,
|
||||
res_real,
|
||||
envv );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user