diff --git a/README.md b/README.md index ab21bf2..206e7b0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Subprocessing in C++] +## [Subprocessing in C++] ## Design Goals The only goal was to develop something that is as close as python2.7 subprocess module in dealing with processes. diff --git a/subprocess.hpp b/subprocess.hpp index c77cb7e..4f26e56 100755 --- a/subprocess.hpp +++ b/subprocess.hpp @@ -674,7 +674,7 @@ struct input } input(IOTYPE typ) { assert (typ == PIPE && "STDOUT/STDERR not allowed"); -#ifndef _MSC_VER +#ifndef _MSC_VER std::tie(rd_ch_, wr_ch_) = util::pipe_cloexec(); #endif } @@ -1303,7 +1303,10 @@ inline int Popen::wait() noexcept(false) inline int Popen::poll() noexcept(false) { int status; + +#ifndef _MSC_VER if (!child_created_) return -1; // TODO: ?? +#endif #ifdef _MSC_VER int ret = WaitForSingleObject(process_handle_, 0); @@ -1672,12 +1675,11 @@ namespace detail { std::string err_msg(exp.what()); //ATTN: Can we do something on error here ? util::write_n(err_wr_pipe_, err_msg.c_str(), err_msg.length()); - throw; } // Calling application would not get this // exit failure - exit (EXIT_FAILURE); + _exit (EXIT_FAILURE); #endif }