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:
Nicholas Burlett 2008-01-04 11:56:31 +10:00
parent 063c4d7e67
commit 564d19e3bd

5
exec.c
View File

@ -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 );
}
}