PlatformUtils.cpp 263 B

12345678910111213141516171819
  1. //
  2. // Created by Tobias Hieta on 15/05/15.
  3. //
  4. #include "PlatformUtils.h"
  5. #ifdef Q_OS_UNIX
  6. #include <signal.h>
  7. #endif
  8. bool PlatformUtils::isProcessAlive(Q_PID pid)
  9. {
  10. #ifdef Q_OS_UNIX
  11. int ret = kill((pid_t)pid, 0);
  12. return ret == 0;
  13. #endif
  14. return false;
  15. }