diff options
-rw-r--r-- | stream.c | 4 | ||||
-rw-r--r-- | tests/018/process.tl | 27 |
2 files changed, 16 insertions, 15 deletions
@@ -4769,7 +4769,7 @@ static val run(val command, val args) if (ch_env != t) { save_env = env(); - replace_env(ch_env, nil); + replace_env(ch_env); } wargv = coerce(const wchar_t **, chk_xalloc(nargs + 1, sizeof *wargv, self)); @@ -4792,7 +4792,7 @@ static val run(val command, val args) uw_unwind { if (ch_env != t) - replace_env(save_env, nil); + replace_env(save_env); fds_restore(&sfds); } diff --git a/tests/018/process.tl b/tests/018/process.tl index a1970738..ce545dc3 100644 --- a/tests/018/process.tl +++ b/tests/018/process.tl @@ -26,16 +26,17 @@ (fcmd (let ((*stdout* *stdnull*)) (sh "echo foo"))) "" (fcmd (let ((*stderr* *stdout*)) (sh "echo foo 1>&2"))) "foo\n"))) -(mtest - (let ((*child-env* '("a=b"))) - (get-lines (open-process "/usr/bin/env" "r"))) - ("a=b") - (let ((*child-env* nil)) - (get-lines (open-process "/usr/bin/env" "r"))) - nil) - -(test - (fcmd - (let ((*child-env* '("a=b"))) - (run "/usr/bin/env"))) - "a=b\n") +(caseq (os-symbol) + ((:cygwin :cygnal)) + (t (mtest + (let ((*child-env* '("a=b"))) + (get-lines (open-process "/usr/bin/env" "r"))) + ("a=b") + (let ((*child-env* nil)) + (get-lines (open-process "/usr/bin/env" "r"))) + nil) + (test + (fcmd + (let ((*child-env* '("a=b"))) + (run "/usr/bin/env"))) + "a=b\n"))) |