rush
Revamped UNIX Shell
 All Data Structures Files Functions Variables Macros
plist.h
Go to the documentation of this file.
1 
22 #ifndef PLIST_H
23 #define PLIST_H
24 
25 
26 #include <stdbool.h>
27 #include <sys/types.h>
28 
29 
31 typedef struct {
32  pid_t pid;
33  char *cmdLine;
34  bool background;
35 } ProcInfo;
36 
37 
58 const ProcInfo *plistAdd(pid_t pid, const char cmdLine[], bool background);
59 
71 const ProcInfo *plistGet(pid_t pid);
72 
84 int plistRemove(pid_t pid);
85 
105 int plistIterate(int (*callback)(const ProcInfo *));
106 
127 int plistNotifyEvent(pid_t pid, int event);
128 
155 int plistHandleEvents(int (*callback)(const ProcInfo *, int));
156 
157 
158 #endif /* PLIST_H */