Sync with OpenBSD.
bc.y: Rev 1.50 - write parse errors to stderr, prompted by Martijn Dekker - we're only interactive if stdout en stderr are a tty as well as stdin PR: 234430 Obtained from: OpenBSD MFC after: 1 week
This commit is contained in:
parent
5b54ed3f37
commit
1b85c4178e
@ -996,7 +996,7 @@ yyerror(const char *s)
|
||||
putchar('\\');
|
||||
putchar(*p);
|
||||
}
|
||||
fputs("]pc\n", stdout);
|
||||
fputs("]ec\n", stdout);
|
||||
free(str);
|
||||
}
|
||||
|
||||
@ -1173,7 +1173,8 @@ main(int argc, char *argv[])
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
interactive = isatty(STDIN_FILENO);
|
||||
interactive = isatty(STDIN_FILENO) && isatty(STDOUT_FILENO) &&
|
||||
isatty(STDERR_FILENO);
|
||||
for (i = 0; i < argc; i++)
|
||||
sargv[sargc++] = argv[i];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user