This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rshd and stdout

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 (
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
$ rsh localhost main_nocygwin

Sign-up for Ads Free at

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]