koh_process.h

514 B · raw

1/* Process liveness for a stale lock.2 *3 * The folder backend clears a lock only when the writer that took it is gone.4 * The machine's own pid namespace is enough for that: a lock holds the pid that5 * wrote it, and `kill(pid, 0)` answers whether that process still exists.6 * EPERM means it exists but belongs to another user, which still counts.7 */89#ifndef KOH_PROCESS_H10#define KOH_PROCESS_H1112/* 1 when the process exists, 0 when it does not (or the pid is nonsense). */13int koh_pid_alive(int pid);1415#endif