summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-09-01 20:28:23 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-09-01 20:28:23 +0000
commit6ca9de4fa20740ae389b61b83b3a17f363f22dad (patch)
tree2544fd3fdb0ce96a22a61769f6b1729120fa2de1
parentf8a42747f89d2e5d9d88867e6ed98cdf72285766 (diff)
Don't dup stderr, you lose error messages and rsh does it for us anyway.
-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);
}