summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2016-03-07 18:56:33 +0000
committertb <tb@openbsd.org>2016-03-07 18:56:33 +0000
commit920fc16699f913eebd46d2c0e04965ba4e8e603d (patch)
treed9dcd911fd552e10bd41b34b46936ed61a1ed89c
parentSync no-argument function declaration and definition by adding (void). (diff)
downloadwireguard-openbsd-920fc16699f913eebd46d2c0e04965ba4e8e603d.tar.xz
wireguard-openbsd-920fc16699f913eebd46d2c0e04965ba4e8e603d.zip
Make cp -i behave as mv -i or rm -i, independently of whether stdin
is a tty or not. From Timo Buhrmester. ok jca@
-rw-r--r--bin/cp/cp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c
index 4f3228df35c..0d0d87a75d1 100644
--- a/bin/cp/cp.c
+++ b/bin/cp/cp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cp.c,v 1.42 2015/10/09 01:37:06 deraadt Exp $ */
+/* $OpenBSD: cp.c,v 1.43 2016/03/07 18:56:33 tb Exp $ */
/* $NetBSD: cp.c,v 1.14 1995/09/07 06:14:51 jtc Exp $ */
/*
@@ -113,7 +113,7 @@ main(int argc, char *argv[])
iflag = 0;
break;
case 'i':
- iflag = isatty(STDIN_FILENO);
+ iflag = 1;
fflag = 0;
break;
case 'p':