From 083834dcc5b76fe6f1318eb2b91c5caf08cd0c5f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 21 Apr 2017 07:01:34 +0200 Subject: Make dummy process_exit::{signal,core}() available on Windows --- butl/process | 3 +-- butl/process.ixx | 36 ++++++++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/butl/process b/butl/process index c316904..9c0d060 100644 --- a/butl/process +++ b/butl/process @@ -156,7 +156,7 @@ namespace butl // Abnormal termination information. // -#ifndef _WIN32 + // Return the signal number that caused the termination or 0 if no such // information is available. // @@ -167,7 +167,6 @@ namespace butl // bool core () const; -#endif // Return a description of the reason that caused the process to terminate // abnormally. On POSIX this is the signal name, on Windows -- the summary diff --git a/butl/process.ixx b/butl/process.ixx index 65aeeb6..40f6361 100644 --- a/butl/process.ixx +++ b/butl/process.ixx @@ -6,6 +6,8 @@ namespace butl { + // process_path + // inline process_path:: ~process_path () { @@ -49,14 +51,6 @@ namespace butl return *this; } -#ifndef _WIN32 - inline process::id_type process:: - id () const - { - return handle; - } -#endif - inline const char* process_path:: recall_string () const { @@ -69,6 +63,32 @@ namespace butl return effect.empty () ? recall_string () : effect.string ().c_str (); } + // process_exit + // +#ifdef _WIN32 + inline int process_exit:: + signal () const + { + return 0; + } + + inline bool process_exit:: + core () const + { + return false; + } +#endif + + // process + // +#ifndef _WIN32 + inline process::id_type process:: + id () const + { + return handle; + } +#endif + inline process_path process:: path_search (const char*& a0, const dir_path& fb) { -- cgit v1.1