Check that ee's standard input and output is a terminal.

Do not ignore all the signals in range [1..24].

PR:		65892
MFC after:	2 weeks
This commit is contained in:
fjoe 2004-11-05 10:18:05 +00:00
parent 3c548cd5e8
commit 17abd1654b

View File

@ -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);