From 8e7d38906d4bf8a5ba355a0c6cc360f93d37c970 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Wed, 2 Jun 2010 13:39:01 -0400 Subject: [PATCH] kill procs before data --- buildscripts/cleanbb.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/buildscripts/cleanbb.py b/buildscripts/cleanbb.py index 1afa9d47c18..e7df61028e4 100644 --- a/buildscripts/cleanbb.py +++ b/buildscripts/cleanbb.py @@ -38,15 +38,17 @@ def killprocs( signal="" ): def cleanup( root ): + + if killprocs() > 0: + time.sleep(3) + killprocs("-9") + # delete all regular files, directories can stay # NOTE: if we delete directories later, we can't delete diskfulltest for ( dirpath , dirnames , filenames ) in os.walk( root , topdown=False ): for x in filenames: os.remove( dirpath + "/" + x ) - if killprocs() > 0: - time.sleep(3) - killprocs("-9") if __name__ == "__main__": root = "/data/db/"