subproc: nullify stdio later
@@ -201,10 +201,6 @@ static bool subproc_PrepareExecv(run_t* run) {
}
}
- if (run->global->exe.nullifyStdio) {
- util_nullifyStdio();
- }
-
if (run->global->exe.clearEnv) {
environ = NULL;
}
@@ -238,6 +234,10 @@ static bool subproc_PrepareExecv(run_t* run) {
PLOG_W("sigprocmask(empty_set)");
}
+ if (run->global->exe.nullifyStdio) {
+ util_nullifyStdio();
+ }
+
return true;
}
