]> git.ipfire.org Git - pakfire.git/commitdiff
cgroups: Ignore if process has already been gone.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 11 Apr 2012 17:28:57 +0000 (19:28 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 11 Apr 2012 17:28:57 +0000 (19:28 +0200)
python/pakfire/cgroup.py

index 3a1aa25a5de0234ead2b624e1a3887d90d6fa13b..60c96a3d55b6e559bde98a9aec5353cf0a7f09a5 100644 (file)
@@ -266,7 +266,11 @@ class CGroup(object):
                                try:
                                        os.kill(proc, sig)
                                except OSError, e:
-                                       raise
+                                       # Skip "No such process" error
+                                       if e.errno == 3:
+                                               pass
+                                       else:
+                                               raise
 
                                # Save all killed processes to a list.
                                killed_processes.append(proc)