comparison 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
comparison
equal deleted inserted replaced
1489:1389834e130f 1490:596927722403
54 #include <boost/regex.hpp> 54 #include <boost/regex.hpp>
55 #endif 55 #endif
56 56
57 #if defined(_WIN32) 57 #if defined(_WIN32)
58 #include <windows.h> 58 #include <windows.h>
59 #include <process.h> // For "_spawnvp()" 59 #include <process.h> // For "_spawnvp()" and "_getpid()"
60 #else 60 #else
61 #include <unistd.h> // For "execvp()" 61 #include <unistd.h> // For "execvp()"
62 #include <sys/wait.h> // For "waitpid()" 62 #include <sys/wait.h> // For "waitpid()"
63 #endif 63 #endif
64 64
1263 { 1263 {
1264 return str.compare(0, prefix.size(), prefix) == 0; 1264 return str.compare(0, prefix.size(), prefix) == 0;
1265 } 1265 }
1266 } 1266 }
1267 1267
1268
1269 int Toolbox::GetProcessId()
1270 {
1271 #if defined(_WIN32)
1272 return static_cast<int>(_getpid());
1273 #else
1274 return static_cast<int>(getpid());
1275 #endif
1276 }
1268 } 1277 }
1269 1278