aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--msvc-common/msvc-filter.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/msvc-common/msvc-filter.cxx b/msvc-common/msvc-filter.cxx
index ae1a3ff..b45a90b 100644
--- a/msvc-common/msvc-filter.cxx
+++ b/msvc-common/msvc-filter.cxx
@@ -18,6 +18,7 @@
#include <libbutl/path.mxx> // path::traits::realize()
#include <libbutl/utility.mxx> // alpha(), throw_generic_error()
#include <libbutl/process.mxx>
+#include <libbutl/optional.mxx>
#include <libbutl/fdstream.mxx>
#include <msvc-common/version.hxx>
@@ -297,10 +298,10 @@ try
// Timeout occured. Apply wineserver bug workaround if required.
//
- bool status;
- if (r == 0 && pr.try_wait (status))
+ butl::optional<bool> status;
+ if (r == 0 && (status = pr.try_wait ()))
{
- if (!status)
+ if (!*status)
// Handle the child failure outside the loop.
//
break;