#include "koh_process.h" #include #include int koh_pid_alive(int pid) { if (pid <= 0) { return 0; } if (kill(pid, 0) == 0) { return 1; } return errno == EPERM ? 1 : 0; }