From 9be978bd7befdcb8987714a4089ed71a1bd8f163 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Mon, 15 Jan 2024 12:43:09 +0100 Subject: [PATCH] Skip posix_spawn if IOs are redirected --- process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/process.c b/process.c index 4e09d2d9288981..309c0cb72ed7bf 100644 --- a/process.c +++ b/process.c @@ -4696,6 +4696,7 @@ rb_spawn_process(struct rb_execarg *eargp, char *errmsg, size_t errmsg_buflen) #if HAVE_POSIX_SPAWN if (//!eargp->use_shell && // !eargp->pgroup_given && + eargp->close_others_maxhint == -1 && !eargp->umask_given && !eargp->unsetenv_others_given && !eargp->close_others_given &&