From 459a5ad410af51a1a35576d0d32b0fd8859fbb9b Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 11 Feb 2008 08:35:03 +0000 Subject: hush: set CLOEXEC on script file being executed --- shell/hush.c | 1 + 1 file changed, 1 insertion(+) (limited to 'shell') diff --git a/shell/hush.c b/shell/hush.c index 02ec0ea..2560d6e 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -3918,6 +3918,7 @@ int hush_main(int argc, char **argv) global_argv = argv + optind; global_argc = argc - optind; input = xfopen(argv[optind], "r"); + fcntl(fileno(input), F_SETFD, FD_CLOEXEC); opt = parse_and_run_file(input); } -- cgit v1.1