blob: 1da7c6d868e5494f6b1759ee9fb6513c27ff6f5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#ifndef OPIE_PROC_CTL_H
#define OPIE_PROC_CTL_H
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <qmap.h>
struct ProcContainer {
pid_t pid;
int fd;
int status;
ProcContainer* prev;
};
class ProcCtl {
private:
ProcCtl();
public:
~ProcCtl();
static ProcCtl* self();
int status(pid_t)const;
void add( pid_t, int fd );
void remove( pid_t );
void remove( ProcContainer );
private:
static void signal_handler(int);
static ProcContainer* m_last;
static ProcCtl* m_self;
};
#endif
|