aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-21 07:01:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-21 07:01:34 +0200
commit083834dcc5b76fe6f1318eb2b91c5caf08cd0c5f (patch)
tree8a2a04008c5f119bd8207c4f7df4f815c9fe8622
parent5661b404b0104c3065a40ad622bdd3c11d748a99 (diff)
Make dummy process_exit::{signal,core}() available on Windows
-rw-r--r--butl/process3
-rw-r--r--butl/process.ixx36
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)
{