aboutsummaryrefslogtreecommitdiffhomepage
path: root/exec.c
diff options
context:
space:
mode:
authorGravatar Nicholas Burlett <nickburlett@mac.com>2008-01-04 11:56:31 +1000
committerGravatar Nicholas Burlett <nickburlett@mac.com>2008-01-04 11:56:31 +1000
commit564d19e3bd4e30d284f4a1424834118afc8ff77f (patch)
tree2c0c7c9974eb5c7c403b2df1e6d5c2370d69c94b /exec.c
parent063c4d7e67761a8611410fb21f2f7b0d89d3912d (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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 090f7a40..f2a77100 100644
--- a/exec.c
+++ b/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 );
}
}