* Wrapper class around pids.
This commit is contained in:
@@ -172,6 +172,7 @@ public:
|
||||
void cancel();
|
||||
};
|
||||
|
||||
|
||||
class AutoCloseFD
|
||||
{
|
||||
int fd;
|
||||
@@ -185,6 +186,7 @@ public:
|
||||
bool isOpen();
|
||||
};
|
||||
|
||||
|
||||
class Pipe
|
||||
{
|
||||
public:
|
||||
@@ -192,6 +194,7 @@ public:
|
||||
void create();
|
||||
};
|
||||
|
||||
|
||||
class AutoCloseDir
|
||||
{
|
||||
DIR * dir;
|
||||
@@ -204,6 +207,21 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class Pid
|
||||
{
|
||||
pid_t pid;
|
||||
bool separatePG;
|
||||
public:
|
||||
Pid();
|
||||
~Pid();
|
||||
void operator =(pid_t pid);
|
||||
operator pid_t();
|
||||
void kill();
|
||||
int wait(bool block);
|
||||
void setSeparatePG(bool separatePG);
|
||||
};
|
||||
|
||||
|
||||
/* User interruption. */
|
||||
|
||||
extern volatile sig_atomic_t _isInterrupted;
|
||||
|
||||
Reference in New Issue
Block a user