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 &&