mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 00:50:50 +00:00
ee: restore the stdin/stdout terminal check
This seems to have been lost during updates from upstream, and was reported (on IRC) as a nice feature to have (again). Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D28689
This commit is contained in:
parent
7763814fc9
commit
0cb61a320a
|
@ -554,6 +554,13 @@ char *argv[];
|
|||
for (counter = 1; counter < 24; counter++)
|
||||
signal(counter, SIG_IGN);
|
||||
|
||||
/* Always read from (and write to) a terminal. */
|
||||
if (!isatty(STDIN_FILENO) || !isatty(STDOUT_FILENO)) {
|
||||
fprintf(stderr,
|
||||
"ee's standard input and output must be a terminal\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
signal(SIGCHLD, SIG_DFL);
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
signal(SIGINT, edit_abort);
|
||||
|
|
Loading…
Reference in a new issue