DaanDeMeyer / reproc

A cross-platform (C99/C++11) process library
MIT License
552 stars 65 forks source link

Redirect child process stdout to parent? #50

Closed cmaughan closed 3 years ago

cmaughan commented 3 years ago

If I set this option, I can make a child output to a file path instead of the console: options.redirect.out.path = "c:/foo/bar.txt"

How would I make the child process output to the same stdout as the parent (so the output appears in the console of the parent process)? Is that possible?

DaanDeMeyer commented 3 years ago

options.redirect.out.type = reproc::redirect::parent; ?

DaanDeMeyer commented 3 years ago

Closing, feel free to reopen if the above doesn't work as expected.

cmaughan commented 3 years ago

Ah, that was the magic I was missing, thanks!