diff options
-rw-r--r-- | stream.c | 4 | ||||
-rw-r--r-- | tests/018/process.tl | 12 |
2 files changed, 11 insertions, 5 deletions
@@ -4263,7 +4263,7 @@ static int fds_getfd(val stream, val self) return fd_sub; } -#if !HAVE_FORK_STUFF +#if !HAVE_FORK_STUFF || HAVE_WSPAWN || HAVE_SPAWN static int fds_subst(int fd_sub, int fd_std, val self) { if (fd_sub == fd_std) @@ -4302,7 +4302,7 @@ static void fds_prepare(struct save_fds *fds, int flags, val self) fds->suberr = fds_getfd(std_error, self); } -#if !HAVE_FORK_STUFF +#if !HAVE_FORK_STUFF || HAVE_WSPAWN || HAVE_SPAWN static void fds_swizzle(struct save_fds *fds, int flags, val self) { if ((flags & FDS_IN) != 0) diff --git a/tests/018/process.tl b/tests/018/process.tl index b34047b2..1b3780ac 100644 --- a/tests/018/process.tl +++ b/tests/018/process.tl @@ -13,6 +13,12 @@ ^(with-stream (s (open-subprocess nil "r" nil (lambda () ,*forms))) (get-string s))) -(mtest - (fcmd (let ((*stdout* *stdnull*)) (sh "echo foo"))) "" - (fcmd (let ((*stderr* *stdout*)) (sh "echo foo 1>&1"))) "foo\n") +(caseq (os-symbol) + ((:cygwin :cygnal) + (mtest + (fcmd (let ((*stdout* *stdnull*)) (sh "echo foo"))) "" + (fcmd (let ((*stderr* *stdout*)) (sh "echo foo 1>&2"))) "foo \r\n")) + (t + (mtest + (fcmd (let ((*stdout* *stdnull*)) (sh "echo foo"))) "" + (fcmd (let ((*stderr* *stdout*)) (sh "echo foo 1>&2"))) "foo\n"))) |