Module Name: src
Committed By: uwe
Date: Sat Mar 5 19:48:56 UTC 2016
Modified Files:
src/bin/cp: cp.c
Log Message:
The '-i' flag should work regardless of whether the standard input is
a terminal. The Open Group notes this historic behavior and correctly
notes that it doesn't make much sense. Note also, that mv(1) has
always respected its '-i' regardless of whether the standard input is
a terminal.
>From Timo Buhrmester.
To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/bin/cp/cp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/cp/cp.c
diff -u src/bin/cp/cp.c:1.58 src/bin/cp/cp.c:1.59
--- src/bin/cp/cp.c:1.58 Wed Jan 4 15:58:37 2012
+++ src/bin/cp/cp.c Sat Mar 5 19:48:55 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: cp.c,v 1.58 2012/01/04 15:58:37 christos Exp $ */
+/* $NetBSD: cp.c,v 1.59 2016/03/05 19:48:55 uwe Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
@@ -43,7 +43,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)cp.c 8.5 (Berkeley) 4/29/95";
#else
-__RCSID("$NetBSD: cp.c,v 1.58 2012/01/04 15:58:37 christos Exp $");
+__RCSID("$NetBSD: cp.c,v 1.59 2016/03/05 19:48:55 uwe Exp $");
#endif
#endif /* not lint */
@@ -145,7 +145,7 @@ main(int argc, char *argv[])
iflag = 0;
break;
case 'i':
- iflag = isatty(fileno(stdin));
+ iflag = 1;
fflag = 0;
break;
case 'l':