diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/hush.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c index 2560d6e97..29807f889 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -3880,6 +3880,7 @@ int hush_main(int argc, char **argv) | |||
3880 | } | 3880 | } |
3881 | debug_printf("interactive_fd=%d\n", interactive_fd); | 3881 | debug_printf("interactive_fd=%d\n", interactive_fd); |
3882 | if (interactive_fd) { | 3882 | if (interactive_fd) { |
3883 | fcntl(interactive_fd, F_SETFD, FD_CLOEXEC); | ||
3883 | /* Looks like they want an interactive shell */ | 3884 | /* Looks like they want an interactive shell */ |
3884 | setup_job_control(); | 3885 | setup_job_control(); |
3885 | /* -1 is special - makes xfuncs longjmp, not exit | 3886 | /* -1 is special - makes xfuncs longjmp, not exit |
@@ -3907,8 +3908,9 @@ int hush_main(int argc, char **argv) | |||
3907 | /* give up */ | 3908 | /* give up */ |
3908 | interactive_fd = 0; | 3909 | interactive_fd = 0; |
3909 | } | 3910 | } |
3911 | if (interactive_fd) | ||
3912 | fcntl(interactive_fd, F_SETFD, FD_CLOEXEC); | ||
3910 | } | 3913 | } |
3911 | |||
3912 | #endif | 3914 | #endif |
3913 | 3915 | ||
3914 | if (argv[optind] == NULL) { | 3916 | if (argv[optind] == NULL) { |