← Commit list

08126f665

Denis Vlasenko
Denis Vlasenko
2008-02-11
FAILED Duration: 16s

Subject

hush: close-on-exec interactive_fd

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/hush.c+3 -1
@@ -3880,6 +3880,7 @@ int hush_main(int argc, char **argv)
}
debug_printf("interactive_fd=%d\n", interactive_fd);
if (interactive_fd) {
+ fcntl(interactive_fd, F_SETFD, FD_CLOEXEC);
/* Looks like they want an interactive shell */
setup_job_control();
/* -1 is special - makes xfuncs longjmp, not exit
@@ -3907,8 +3908,9 @@ int hush_main(int argc, char **argv)
/* give up */
interactive_fd = 0;
}
+ if (interactive_fd)
+ fcntl(interactive_fd, F_SETFD, FD_CLOEXEC);
}
-
#endif
if (argv[optind] == NULL) {