diff --git a/src/shell.cpp b/src/shell.cpp index 2eaa25f..960b3a9 100644 --- a/src/shell.cpp +++ b/src/shell.cpp @@ -181,5 +181,5 @@ void ztd::shc::run_process(shc* p) p->running = false; p->wp_finish.notify_all(); - p->return_value = ztd::pclose2(stream, pid); + p->return_value = WEXITSTATUS(ztd::pclose2(stream, pid)); }