diff options
Diffstat (limited to 'butl/process.cxx')
-rw-r--r-- | butl/process.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/butl/process.cxx b/butl/process.cxx index 74892e6..05c06f1 100644 --- a/butl/process.cxx +++ b/butl/process.cxx @@ -1121,6 +1121,17 @@ namespace butl } process::id_type process:: + id () const + { + id_type r (GetProcessId (handle)); + + if (r == 0) + throw process_error (last_error_msg ()); + + return r; + } + + process::id_type process:: current_id () { return GetCurrentProcessId (); |