delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/01/15/21:45:42

From: kuku AT gilberto DOT physik DOT RWTH-Aachen DOT DE (Christoph Kukulies)
Subject: rsh tip needed
15 Jan 1999 21:45:42 -0800 :
Message-ID: <199901151925.UAA24412.cygnus.gnu-win32@gilberto.physik.RWTH-Aachen.DE>
To: gnu-win32 AT cygnus DOT com

I'm using the rshd from the NT resource kit.

Does gnu-win32 provide an rcmd/rsh interface?

Independent of that I have a question:

I'm writing a cgi program that runs on a unix machine (apache server).
The cgi C program should execute something like:

main()
{
   execl("/usr/bin/rsh","/usr/bin/rsh","WINNTPC","dir >kuku.txt",0);
}

Actually the remote command is more complex but it should return
some output to the cgi program or, if that doesn't work, write its
output to a file in the common www directory which both machines
share.

Anyway, maybe someone can answer the following questions:

Why does redirection in the above command not work?

How can I intercept the output of the execl on the unix side?
Should I create a pipe? My idea is to either write the output to a file
for subsequent manipulation into HTML or directly retrieve the
output of that command for filtering in the cgi program and issuing
HTML that then can appear in the browser.

-- 
Chris Christoph P. U. Kukulies kuku AT gil DOT physik DOT rwth-aachen DOT de
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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