aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/ee
diff options
context:
space:
mode:
authorMax Khon <fjoe@FreeBSD.org>2004-11-05 10:18:05 +0000
committerMax Khon <fjoe@FreeBSD.org>2004-11-05 10:18:05 +0000
commit0acb526b6791db5cb04de5c1912e2e51b8d71922 (patch)
treee729eddbeebe79ba80fc894773231b0ca052b20c /usr.bin/ee
parent2fdf5be172b187463b3230e6546c3e9ac1fdb691 (diff)
Notes
Diffstat (limited to 'usr.bin/ee')
-rw-r--r--usr.bin/ee/ee.c9
1 files changed, 5 insertions, 4 deletions
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);