From d53007739eb366123ee4e055861ced3b7d031531 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Wed, 9 Dec 2020 19:04:05 -0600 Subject: [PATCH] Invert read/write bits on pipe in os/execute. It was backwards, breaking this functionality. --- src/core/os.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/os.c b/src/core/os.c index 07697fc9..278af1ef 100644 --- a/src/core/os.c +++ b/src/core/os.c @@ -808,9 +808,9 @@ static Janet os_execute_impl(int32_t argc, Janet *argv, int is_async) { #else proc->pid = pid; #endif - proc->in = get_stdio_for_handle(new_in, orig_in, 0); - proc->out = get_stdio_for_handle(new_out, orig_out, 1); - proc->err = get_stdio_for_handle(new_err, orig_err, 1); + proc->in = get_stdio_for_handle(new_in, orig_in, 1); + proc->out = get_stdio_for_handle(new_out, orig_out, 0); + proc->err = get_stdio_for_handle(new_err, orig_err, 0); proc->flags = 0; if (proc->in == NULL || proc->out == NULL || proc->err == NULL) { janet_panic("failed to construct proc");