[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-689-gbf31baf

Andreas Beckmann debian at abeckmann.de
Sun Jun 10 11:10:18 UTC 2012


The following commit has been merged in the piatti branch:
commit f96e52e3c8e0e2e1508bc2580aadfd7245300e37
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Mon Jun 4 23:54:07 2012 +0200

    p: split terminate_running_processes from check_for_no_processes
    
    split Chroot.terminate_running_processes() out of
    Chroot.check_for_no_processes()
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/piuparts.py b/piuparts.py
index 9133572..46bf41e 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1225,6 +1225,11 @@ class Chroot:
         if count > 0:
             logging.error("FAIL: Processes are running inside chroot:\n%s" % 
                           indent_string(output))
+            self.terminate_running_processes()
+            panic()
+
+
+    def terminate_running_processes(self):
             for signo in [ 15, 9 ]:
                 p = subprocess.Popen(["lsof", "-t", "+D", self.name],
                                stdin=subprocess.PIPE, stdout=subprocess.PIPE)
@@ -1240,7 +1245,6 @@ class Chroot:
                                     os.kill(pid, SIGKILL)
                             except OSError:
                                 pass
-            panic()
 
 
     def mount_selinux(self):

-- 
piuparts git repository



More information about the Piuparts-commits mailing list