summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/rcmdsh.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1996-09-01 20:28:22 +0000
committermillert <millert@openbsd.org>1996-09-01 20:28:22 +0000
commita02b938570f4ad7a71ad3762d0edabb5d69135e8 (patch)
tree33a9041024980aad2573482906ef860694f1e28c /lib/libc/net/rcmdsh.c
parentlarger -> smaller. (diff)
downloadwireguard-openbsd-a02b938570f4ad7a71ad3762d0edabb5d69135e8.tar.xz
wireguard-openbsd-a02b938570f4ad7a71ad3762d0edabb5d69135e8.zip
Don't dup stderr, you lose error messages and rsh does it for us anyway.
Diffstat (limited to 'lib/libc/net/rcmdsh.c')
-rw-r--r--lib/libc/net/rcmdsh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/net/rcmdsh.c b/lib/libc/net/rcmdsh.c
index 47b200ed682..fe49a5a21bb 100644
--- a/lib/libc/net/rcmdsh.c
+++ b/lib/libc/net/rcmdsh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcmdsh.c,v 1.1 1996/08/22 20:11:20 millert Exp $ */
+/* $OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $ */
/*
* This is an rcmd() replacement originally by
@@ -6,7 +6,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.1 1996/08/22 20:11:20 millert Exp $";
+static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -69,7 +69,7 @@ rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog)
* Child. We use sp[1] to be stdin/stdout, and close sp[0].
*/
(void) close(sp[0]);
- if (dup2(sp[1], 0) < 0 || dup2(0, 1) < 0 || dup2(0, 2) < 0) {
+ if (dup2(sp[1], 0) < 0 || dup2(0, 1) < 0) {
perror("rcmdsh: dup2 failed");
_exit(255);
}