Capturing stdin/stdout for called processes

From: John Smith (someone_at_microsoft.com)
Date: 10/27/03

  • Next message: Rob Kennedy: "Re: Capturing stdin/stdout for called processes"
    Date: Mon, 27 Oct 2003 05:33:39 GMT
    
    

    Has Anyone found a stable way of capturing the sdtout stream from a called
    process? For example, when calling another command line app, in C++ it's
    pretty trivial to catch the stdout with a pipe, but I can't seem to get it
    to work in Delphi, and I've tried getOverlapped read, pipes and threaded
    access, to no avail. I either seem to get nothing, or hung.

    Thanks for any advice or examples.

    (Please excuse the 3-way x-post, and CC replies to mrcookies at yahoo)


  • Next message: Rob Kennedy: "Re: Capturing stdin/stdout for called processes"

    Relevant Pages

    • Capturing stdin/stdout for called processes
      ... For example, when calling another command line app, in C++ it's ... pretty trivial to catch the stdout with a pipe, but I can't seem to get it ...
      (alt.comp.lang.borland-delphi)
    • Re: Using binary data with process.standardInput/StandardOutput
      ... The problem is that this mechanism was designed for one app to pipe to ... runs until the buffer fills up. ...
      (microsoft.public.dotnet.framework)
    • How to check if a thread waits for data at the read-end of a pipe?
      ... Win32 and in the Win32 version I need a way to check ... attach a semaphore to a named pipe and I can then use the other API ... My application acts as a GUI command line shell in this regard. ... child's STDIN, STDOUT and STDERR streams in standard documented ways. ...
      (microsoft.public.win32.programmer.kernel)
    • Re: accomodating an unknown number of pipes in a shell program
      ... Each command is exec'd in a forked child process. ... Close all pipe file descriptors: ... the last pipe character) on to another child to repeat the process. ...
      (comp.unix.programmer)
    • [opensuse] Re: USER question
      ... how do you detect EOF on> the ... The only way to generate EOF on a pipe is to close the pipe. ... All use of the user alias is in a gosub and the gosub includes the user command that opens the pipe, and never closes it, relying on the fact that filepro doesn't actually spawn further instances of the target program when re-executing the same user command. ... If you try to read form user when the app isn't writing, you hang until the app sends you an end of line. ...
      (SuSE)