aboutsummaryrefslogtreecommitdiff
path: root/butl/process
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-07-12 17:24:00 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-07-23 19:42:48 +0300
commit6c8e3f09c185d7fa4664ccd9e5c4f623a17b84cc (patch)
tree513f523dba31f275994d8152c02db82f3380c56e /butl/process
parent09bedede7116961fbfb298a6a6cfa933af7af682 (diff)
Extend fdstream
Diffstat (limited to 'butl/process')
-rw-r--r--butl/process15
1 files changed, 9 insertions, 6 deletions
diff --git a/butl/process b/butl/process
index 54a8dae..e864b53 100644
--- a/butl/process
+++ b/butl/process
@@ -88,13 +88,13 @@ namespace butl
process (const char* cwd, char const* const[], process&, int = 1, int = 2);
// Wait for the process to terminate. Return true if the process
- // terminated normally and with the zero exit status. Throw
- // process_error if anything goes wrong. This function can be
- // called multiple times with subsequent calls simply returning
- // the status.
+ // terminated normally and with the zero exit status. Unless ignore_error
+ // is true, throw process_error if anything goes wrong. This function can
+ // be called multiple times with subsequent calls simply returning the
+ // status.
//
bool
- wait ();
+ wait (bool ignore_errors = false);
// Return true if the process has already terminated in which case
// the argument is set to the result of wait().
@@ -102,7 +102,10 @@ namespace butl
bool
try_wait (bool&);
- ~process () {if (handle != 0) wait ();}
+ // Note that the destructor will wait for the process but will ignore
+ // any errors and the exit status.
+ //
+ ~process () {if (handle != 0) wait (true);}
// Moveable-only type.
//