mirror of
https://github.com/arun11299/cpp-subprocess.git
synced 2025-08-04 20:36:20 -04:00
17 lines
266 B
C++
17 lines
266 B
C++
#include <iostream>
|
|
#include "../subprocess.hpp"
|
|
|
|
using namespace subprocess;
|
|
|
|
void test_redirect()
|
|
{
|
|
auto p = Popen("./write_err.sh", output{"write_err.txt"}, error{STDOUT});
|
|
std::cout << p.poll() << std::endl;
|
|
|
|
}
|
|
|
|
int main() {
|
|
test_redirect();
|
|
return 0;
|
|
}
|