about summary refs log tree commit diff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-06-22T09·51+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-06-22T09·51+0000
commitc9fbd2dfd51eebcb561f9b548c10c68ad89652e5 (patch)
tree623a3303d6ad1bb4af9c7b63754f2693af895e16 /src/libutil/util.hh
parent155d7c8dfa46da054beaf37d6415d52613e2bb17 (diff)
* Wrapper class around pids.
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 21c6774b9d07..67661eb5f882 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -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;