pipe read failure means subprocess exited with non-zero

master
Daniel Kolesa 2017-05-28 16:30:07 +02:00
parent 75c1c24a1c
commit 8dad7ac73a
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,7 @@ OSTD_EXPORT int subprocess::close() {
auto r = read(pd->errno_fd, &eno, sizeof(int));
reset();
if (r < 0) {
throw subprocess_error{"could not read from pipe"};
return retc;
} else if (r == sizeof(int)) {
auto ec = std::system_category().default_error_condition(eno);
auto app = appender<std::string>();