aboutsummaryrefslogtreecommitdiff
path: root/butl/process.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-10 13:19:19 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-10 13:19:19 +0200
commit550b5257aba507bcce98f6832b8905769a14955d (patch)
tree82804b1d214e94ceb8736f215dd20082614cbc1c /butl/process.ixx
parent0703f7a1acc9bf9512fdcad43a18a17981c8ca9e (diff)
Add process_run()/process_start() higher-level API on top of class process
Diffstat (limited to 'butl/process.ixx')
-rw-r--r--butl/process.ixx11
1 files changed, 11 insertions, 0 deletions
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;
+ }
}