diff --git a/usr.bin/ee/ee.c b/usr.bin/ee/ee.c index 65ca72de49e4..0284b7f662de 100644 --- a/usr.bin/ee/ee.c +++ b/usr.bin/ee/ee.c @@ -544,10 +544,11 @@ main(argc, argv) /* beginning of main program */ int argc; char *argv[]; { - int counter; - - 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);