Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh PR standards/52406



details:   https://anonhg.NetBSD.org/src/rev/59496aeecafb
branches:  trunk
changeset: 355296:59496aeecafb
user:      kre <kre%NetBSD.org@localhost>
date:      Mon Jul 24 12:35:37 2017 +0000

description:
PR standards/52406

Absent other information, the shell should be interactive if reading
from stdin, and stdin and stderr are ttys, not stdin and stdout.

So sayeth the great lord posix.

diffstat:

 bin/sh/options.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r c172935af267 -r 59496aeecafb bin/sh/options.c
--- a/bin/sh/options.c  Mon Jul 24 12:35:12 2017 +0000
+++ b/bin/sh/options.c  Mon Jul 24 12:35:37 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: options.c,v 1.49 2017/05/29 14:03:23 kre Exp $ */
+/*     $NetBSD: options.c,v 1.50 2017/07/24 12:35:37 kre Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)options.c  8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: options.c,v 1.49 2017/05/29 14:03:23 kre Exp $");
+__RCSID("$NetBSD: options.c,v 1.50 2017/07/24 12:35:37 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -107,7 +107,7 @@
 
        if (*argptr == NULL && minusc == NULL)
                sflag = 1;
-       if (iflag == 2 && sflag == 1 && isatty(0) && isatty(1))
+       if (iflag == 2 && sflag == 1 && isatty(0) && isatty(2))
                iflag = 1;
        if (iflag == 1 && sflag == 2)
                iflag = 2;



Home | Main Index | Thread Index | Old Index