blob: e2161f3ed10106e1d5fdfde9f3bf3f0b5b72b3a6 (
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
|
#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 {
public:
ProcCtl();
~ProcCtl();
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;
};
#endif
|