Skip to content

Commit 9739ece

Browse files
Fix freezer cgroup removal
1 parent e546271 commit 9739ece

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dlinject.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,13 @@ def dlinject(pid, lib_path, stopmethod="sigstop"):
253253
log.info("Thawing process...")
254254
with open(freeze_dir+"/freezer.state", "w") as state_file:
255255
state_file.write("THAWED\n")
256-
#os.rmdir(freeze_dir) # XXX: This fails because there are still running tasks in the group?
256+
257+
# put the task back in the root cgroup
258+
with open("/sys/fs/cgroup/freezer/tasks", "w") as task_file:
259+
task_file.write(str(pid))
260+
261+
# cleanup
262+
os.rmdir(freeze_dir)
257263

258264
log.success("Done!")
259265

0 commit comments

Comments
 (0)