diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-11 08:35:03 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-11 08:35:03 +0000 |
commit | 459a5ad410af51a1a35576d0d32b0fd8859fbb9b (patch) | |
tree | 802ebc0e8b6f2f9f018bb1f688572ee3c0dfaed3 /shell | |
parent | 4ecfcdcceda6946c83345d818cbd5bc681107603 (diff) | |
download | busybox-w32-459a5ad410af51a1a35576d0d32b0fd8859fbb9b.tar.gz busybox-w32-459a5ad410af51a1a35576d0d32b0fd8859fbb9b.tar.bz2 busybox-w32-459a5ad410af51a1a35576d0d32b0fd8859fbb9b.zip |
hush: set CLOEXEC on script file being executed
Diffstat (limited to 'shell')
-rw-r--r-- | shell/hush.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c index 02ec0ea0e..2560d6e97 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -3918,6 +3918,7 @@ int hush_main(int argc, char **argv) | |||
3918 | global_argv = argv + optind; | 3918 | global_argv = argv + optind; |
3919 | global_argc = argc - optind; | 3919 | global_argc = argc - optind; |
3920 | input = xfopen(argv[optind], "r"); | 3920 | input = xfopen(argv[optind], "r"); |
3921 | fcntl(fileno(input), F_SETFD, FD_CLOEXEC); | ||
3921 | opt = parse_and_run_file(input); | 3922 | opt = parse_and_run_file(input); |
3922 | } | 3923 | } |
3923 | 3924 | ||