Open klosworks opened 5 years ago
I would expect this code:
using namespace subprocess; auto proc = Popen("ls fdklajfdlsajfdkljaf", error{PIPE}, cwd{where}, shell{true}); auto errors = proc.communicate().first; std::cerr << errors.buf.data() << std::endl; int exit_code = proc.wait(); if(exit_code != 0) { cerr << "the command " << command << " returned error code " << exit_code << endl; exit(1); }
to set the exit_code variable to 2 and exit. Instead it sets it to 0 and goes on.
exit_code
I would expect this code:
to set the
exit_code
variable to 2 and exit. Instead it sets it to 0 and goes on.