swapon: add swapflags definitions
[trinity.git] / include / pids.h
blobd80c1a1fd95a6bf0319ffcade51a738b4e395c6a
1 #pragma once
3 #include <sys/types.h>
4 #include "child.h"
5 #include "types.h"
7 extern pid_t mainpid;
8 extern pid_t initpid;
9 extern pid_t watchdog_pid;
11 #define for_each_pidslot(i) for (i = 0; i < max_children; i++)
13 #define PIDSLOT_NOT_FOUND -1
14 #define EMPTY_PIDSLOT -1
15 int find_pid_slot(pid_t mypid);
16 bool pidmap_empty(void);
17 void dump_pid_slots(void);
18 int pid_is_valid(pid_t);
19 void pids_init(void);
21 #define pid_alive(_pid) kill(_pid, 0)