From 550b5257aba507bcce98f6832b8905769a14955d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 10 Apr 2017 13:19:19 +0200 Subject: Add process_run()/process_start() higher-level API on top of class process --- butl/process.ixx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'butl/process.ixx') diff --git a/butl/process.ixx b/butl/process.ixx index 8935adb..c452b0f 100644 --- a/butl/process.ixx +++ b/butl/process.ixx @@ -165,4 +165,15 @@ namespace butl return *this; } + + inline bool process:: + try_wait (bool& s) + { + bool r (try_wait ()); + + if (r) + s = exit && exit->normal () && exit->code () == 0; + + return r; + } } -- cgit v1.1