diff options
Diffstat (limited to 'usr.bin/ee')
-rw-r--r-- | usr.bin/ee/ee.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ee/ee.c b/usr.bin/ee/ee.c index 65ca72d..0284b7f 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); |