delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/22/10:23:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <20040122152308.51226.qmail@mail.com>
MIME-Version: 1.0
From: "Pierre Bogossian" <bogossian AT mail DOT com>
To: cygwin AT cygwin DOT com
Date: Thu, 22 Jan 2004 10:23:08 -0500
Subject: Re: rshd and stdout
X-Originating-Ip: 212.157.122.221
X-Originating-Server: ws1-8.us4.outblaze.com

David Reid wrote:
>I'm using rsh to run a command on a remote machine.
>But I only get output back from stderr, not from 
>stdout. Here is my sample program and the output:
>
>   main() {
>      fprintf(stdout, "stdout\n");
>      fprintf(stderr, "stderr\n");   
>   }
>
>   $ rsh machine1 ./main
>   stderr
>
>How can I get stdout back to the rsh client?
>
>Note: cygwin rshd is running on a windows box, rsh can
>
>be on windows or linux, the result is the same.
>It works as I would expect when using the linux rshd 
>on a linux box (it prints stdout and stderr)

Did you compile your sample program with the -mno-cygwin flag or
with a non-cygwin compiler ?
I'm asking because this problem reminds me of an issue I reported
last year (http://sources.redhat.com/ml/cygwin/2003-02/msg02224.html)
and which is still unresolved (actually, I don't think that
anyone really paid attention to my report ;-).

Anyway, running cygwin and non-cygwin binaries of your
sample program using rsh gives interesting results:

$ rsh localhost main_cygwin
stdout
$ rsh localhost main_nocygwin
stderr

Pierre
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019