diff options
author | millert <> | 1996-09-01 20:28:22 +0000 |
---|---|---|
committer | millert <> | 1996-09-01 20:28:22 +0000 |
commit | 3c80fbbadfa04cbf4809c790d6b7be31beca12bf (patch) | |
tree | 8ee159ee1c5aa03828beb1d5368063b94a469b32 /src | |
parent | 05732cd2c09bd7b9166d66f4fd2db780528be365 (diff) | |
download | openbsd-3c80fbbadfa04cbf4809c790d6b7be31beca12bf.tar.gz openbsd-3c80fbbadfa04cbf4809c790d6b7be31beca12bf.tar.bz2 openbsd-3c80fbbadfa04cbf4809c790d6b7be31beca12bf.zip |
Don't dup stderr, you lose error messages and rsh does it for us anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libc/net/rcmdsh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/net/rcmdsh.c b/src/lib/libc/net/rcmdsh.c index 47b200ed68..fe49a5a21b 100644 --- a/src/lib/libc/net/rcmdsh.c +++ b/src/lib/libc/net/rcmdsh.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rcmdsh.c,v 1.1 1996/08/22 20:11:20 millert Exp $ */ | 1 | /* $OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * This is an rcmd() replacement originally by | 4 | * This is an rcmd() replacement originally by |
@@ -6,7 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #if defined(LIBC_SCCS) && !defined(lint) | 8 | #if defined(LIBC_SCCS) && !defined(lint) |
9 | static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.1 1996/08/22 20:11:20 millert Exp $"; | 9 | static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $"; |
10 | #endif /* LIBC_SCCS and not lint */ | 10 | #endif /* LIBC_SCCS and not lint */ |
11 | 11 | ||
12 | #include <sys/types.h> | 12 | #include <sys/types.h> |
@@ -69,7 +69,7 @@ rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog) | |||
69 | * Child. We use sp[1] to be stdin/stdout, and close sp[0]. | 69 | * Child. We use sp[1] to be stdin/stdout, and close sp[0]. |
70 | */ | 70 | */ |
71 | (void) close(sp[0]); | 71 | (void) close(sp[0]); |
72 | if (dup2(sp[1], 0) < 0 || dup2(0, 1) < 0 || dup2(0, 2) < 0) { | 72 | if (dup2(sp[1], 0) < 0 || dup2(0, 1) < 0) { |
73 | perror("rcmdsh: dup2 failed"); | 73 | perror("rcmdsh: dup2 failed"); |
74 | _exit(255); | 74 | _exit(255); |
75 | } | 75 | } |