Date: Sun, 27 Jan 2019 13:58:06 +0000 (UTC) From: Takahashi Yoshihiro <nyan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343491 - stable/11/usr.bin/bc Message-ID: <201901271358.x0RDw6Hc021693@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nyan Date: Sun Jan 27 13:58:06 2019 New Revision: 343491 URL: https://svnweb.freebsd.org/changeset/base/343491 Log: MFC: r342964 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 Modified: stable/11/usr.bin/bc/bc.y Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/bc/bc.y ============================================================================== --- stable/11/usr.bin/bc/bc.y Sun Jan 27 13:56:44 2019 (r343490) +++ stable/11/usr.bin/bc/bc.y Sun Jan 27 13:58:06 2019 (r343491) @@ -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];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901271358.x0RDw6Hc021693>