diff Core/Toolbox.cpp @ 1490:596927722403

support of --logdir by the internal logger
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 Aug 2015 14:04:48 +0200
parents f967bdf8534e
children e460341872dc
line wrap: on
line diff
--- a/Core/Toolbox.cpp	Tue Aug 04 12:22:08 2015 +0200
+++ b/Core/Toolbox.cpp	Tue Aug 04 14:04:48 2015 +0200
@@ -56,7 +56,7 @@
 
 #if defined(_WIN32)
 #include <windows.h>
-#include <process.h>   // For "_spawnvp()"
+#include <process.h>   // For "_spawnvp()" and "_getpid()"
 #else
 #include <unistd.h>    // For "execvp()"
 #include <sys/wait.h>  // For "waitpid()"
@@ -1265,5 +1265,14 @@
     }
   }
 
+
+  int Toolbox::GetProcessId()
+  {
+#if defined(_WIN32)
+    return static_cast<int>(_getpid());
+#else
+    return static_cast<int>(getpid());
+#endif
+  }
 }