diff options
author | 2008-01-04 11:56:31 +1000 | |
---|---|---|
committer | 2008-01-04 11:56:31 +1000 | |
commit | 564d19e3bd4e30d284f4a1424834118afc8ff77f (patch) | |
tree | 2c0c7c9974eb5c7c403b2df1e6d5c2370d69c94b /exec.c | |
parent | 063c4d7e67761a8611410fb21f2f7b0d89d3912d (diff) |
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
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 ); } } |