Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
scripts: do not close /dev/null when spawning a process
Baptiste Daroussin committed 3 years ago
commit 0cbfe696ddc3e33ac541750b4c9fa98676d01efd
parent e20458c
1 file changed +1 -1
modified libpkg/scripts.c
@@ -160,7 +160,7 @@ pkg_script_run(struct pkg * const pkg, pkg_script type, bool upgrade)
			 * opened fd close all unuseful fd up to there
			 */
			for (int i = 5; i <= cur_pipe[1]; i++) {
-
				if (i != cur_pipe[0])
+
				if (i != cur_pipe[0] && i != ctx.devnullfd)
					posix_spawn_file_actions_addclose(&action, i);
			}
			if (script_len > argmax) {