Implement base::is_process_running() for Unix-like platforms

This commit is contained in:
David Capello 2015-04-09 13:46:37 -03:00
parent 989698dc6a
commit 98f2aca5ca

View File

@ -13,6 +13,7 @@
#ifdef _WIN32
#include <windows.h>
#else
#include <signal.h>
#include <sys/types.h>
#include <unistd.h>
#endif
@ -51,7 +52,7 @@ pid get_current_process_id()
bool is_process_running(pid pid)
{
// TODO
return (kill(pid, 0) == 0);
}
#endif