Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jan 2019 13:56:44 +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-12@freebsd.org
Subject:   svn commit: r343490 - stable/12/usr.bin/bc
Message-ID:  <201901271356.x0RDuimr021581@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nyan
Date: Sun Jan 27 13:56:44 2019
New Revision: 343490
URL: https://svnweb.freebsd.org/changeset/base/343490

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/12/usr.bin/bc/bc.y
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/bc/bc.y
==============================================================================
--- stable/12/usr.bin/bc/bc.y	Sun Jan 27 13:03:48 2019	(r343489)
+++ stable/12/usr.bin/bc/bc.y	Sun Jan 27 13:56:44 2019	(r343490)
@@ -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?201901271356.x0RDuimr021581>