Handle failure path better.

This commit is contained in:
Dianne Skoll
2025-10-07 20:33:46 -04:00
parent e038f74b28
commit 18c3e0fe2e

View File

@@ -47,6 +47,9 @@ int system1(char const *cmd)
set_cloexec(stdin_dup);
}
(void) close(devnull);
} else {
(void) close(stdin_dup);
stdin_dup = -1;
}
}