Cross-platform stderr redirecting in c/c++?


Results 1 to 2 of 2

Thread: Cross-platform stderr redirecting in c/c++?

  1. #1
    Join Date
    May 2003
    Posts
    145

    Cross-platform stderr redirecting in c/c++?

    I am trying to capture the standard error output (not to be confused with standard output) of a program after executing it, that will run on all major platforms. The closest things I could find were popen, which only supports redirecting stdin and stdout, and pipe, which is not cross-platform.
    Is there actually such a solution (preferable elegant, therefore, not embedding perl calls to IPC::Open3 using an obscure CPAN module)?

    Any help would be greatly appreciated.
    -cfaun5

  2. #2
    Join Date
    Mar 2001
    Posts
    729
    er, well, you can only use the standard library if you want it to be cross platform.

    how about freopen() ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •