about summary refs log tree commit diff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2016-10-12T13·49+0200
committerEelco Dolstra <edolstra@gmail.com>2016-10-12T13·49+0200
commit82e2a070e0d2a617cb47c285e176a3fff3ca64e8 (patch)
tree1244c7b943514a66e6495fceaaf7f198294e6a84 /src/libutil/util.cc
parentedf9eb8181e01f6b2123e5690019cfeeb44fc1c2 (diff)
Add some functions needed by hydra
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 1f923fe6bc0f..ce16cc30a5c7 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -778,6 +778,14 @@ void Pid::setKillSignal(int signal)
 }
 
 
+pid_t Pid::release()
+{
+    pid_t p = pid;
+    pid = -1;
+    return p;
+}
+
+
 void killUser(uid_t uid)
 {
     debug(format("killing all processes running under uid ‘%1%’") % uid);