From c50361fa65e6e6939cf6c4928a8094c57ba1360b Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 22 Oct 2008 11:28:15 +0200 Subject: [PATCH] exec.c: Open /dev/null r/w. Just to prevent external programs from getting confused when they write to fd 1 or 2. --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 86362c38..ca59f03d 100644 --- a/exec.c +++ b/exec.c @@ -37,7 +37,7 @@ static int para_exec(pid_t *pid, const char *file, char *const *const args, int if (fds[2] > 0 && pipe(err) < 0) goto err_out; if (!fds[0] || !fds[1] || !fds[2]) { - ret = para_open("/dev/null", O_RDONLY, 42); + ret = para_open("/dev/null", O_RDWR, 42); if (ret < 0) goto err_out; null = ret; -- 2.39.2