diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-05-18 21:02:44 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-05-18 21:02:44 -0700 |
commit | 246887dce1d8d09ec2a5af5f019613ac064e779c (patch) | |
tree | 3b503e475dace16f12e88c4331813470afe26b78 | |
parent | 4f010c138cfc1d58758a4550dcec513e3600dec2 (diff) | |
download | txr-246887dce1d8d09ec2a5af5f019613ac064e779c.tar.gz txr-246887dce1d8d09ec2a5af5f019613ac064e779c.tar.bz2 txr-246887dce1d8d09ec2a5af5f019613ac064e779c.zip |
* stream.c (open_pipev): Bugfix: program name is included
as first element of argv.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | stream.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,5 +1,10 @@ 2012-05-18 Kaz Kylheku <kaz@kylheku.com> + * stream.c (open_pipev): Bugfix: program name is included + as first element of argv. + +2012-05-18 Kaz Kylheku <kaz@kylheku.com> + Implement open_pipev in terms of popen for Windows which does not have for or exec. We could use CreateProcess and CreatePipe, et cetera, but it won't buy us anything because the whole point @@ -1551,9 +1551,9 @@ val open_pipevp(val name, val mode_str, val args) name, num(errno), string_utf8(strerror(errno)), nao); } - argv = (char **) chk_malloc((nargs + 1) * sizeof *argv); + argv = (char **) chk_malloc((nargs + 2) * sizeof *argv); - for (i = 0, iter = args; iter; i++, iter = cdr(iter)) { + for (i = 0, iter = cons(name, args); iter; i++, iter = cdr(iter)) { val arg = car(iter); argv[i] = utf8_dup_to(c_str(arg)); } |