From e13f9778d87143a39d32995e85fbeee3ca638a92 Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Sat, 10 Oct 2020 11:58:23 +0300 Subject: [PATCH] process: tun_piped_stream: stdout stream should be writable Change the stream type to "w" so that it can be written. Signed-off-by: Timo Kokkonen --- process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process.c b/process.c index a54f3dd..96c93f8 100644 --- a/process.c +++ b/process.c @@ -464,7 +464,7 @@ int run_piped_stream(const char *cmd, char *const argv[], } if (stdoutf) { - *stdoutf = fdopen(ofd, "r"); + *stdoutf = fdopen(ofd, "w"); if (*stdoutf == NULL) { pr_err("Error opening file stream for fd %d: %m\n", ofd); -- 2.44.0