From 65d153a29330a9e69b9fca73aea52c04c2910f11 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Tue, 21 Sep 2004 11:19:34 +0000 Subject: [PATCH] if we don't have an errsock, dup stdout to stderr (this would normally be done by inetd, but not by mini_inetd). git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14234 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/rsh/rshd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appl/rsh/rshd.c b/appl/rsh/rshd.c index 14f6e7b82..06c0242b8 100644 --- a/appl/rsh/rshd.c +++ b/appl/rsh/rshd.c @@ -856,6 +856,9 @@ doit (void) if (dup2 (errsock, STDERR_FILENO) < 0) fatal (s, "dup2", "Cannot dup stderr."); close (errsock); + } else { + if (dup2 (STDOUT_FILENO, STDERR_FILENO) < 0) + fatal (s, "dup2", "Cannot dup stderr."); } setup_environment (&env, pwd);