From f605ea59bf3eae122f156267a272c4f9532ea96f Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 28 May 2017 16:31:26 +0200 Subject: [PATCH] gotta read partial read though --- src/posix/process.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/posix/process.cc b/src/posix/process.cc index 6aa09a8..735a39a 100644 --- a/src/posix/process.cc +++ b/src/posix/process.cc @@ -307,6 +307,8 @@ OSTD_EXPORT int subprocess::close() { reset(); if (r < 0) { return retc; + } else if (r != sizeof(int)) { + throw subprocess_error{"could not read from pipe"}; } else if (r == sizeof(int)) { auto ec = std::system_category().default_error_condition(eno); auto app = appender();