summaryrefslogtreecommitdiffstats
path: root/rteval/modules/loads/hackbench.py
diff options
context:
space:
mode:
Diffstat (limited to 'rteval/modules/loads/hackbench.py')
-rw-r--r--rteval/modules/loads/hackbench.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py
index 0985414..12acbe7 100644
--- a/rteval/modules/loads/hackbench.py
+++ b/rteval/modules/loads/hackbench.py
@@ -26,7 +26,7 @@
#
import sys, os, time, glob, subprocess, errno
-from signal import SIGTERM, SIGKILL
+from signal import SIGKILL
from rteval.modules.loads import CommandLineLoad
from rteval.Log import Log
@@ -113,8 +113,11 @@ class Hackbench(CommandLineLoad):
if self._donotrun:
return
- if self.__hbproc.poll() == None:
- os.kill(self.__hbproc.pid, SIGKILL)
+ while self.__hbproc.poll() == None:
+ self._log(Log.DEBUG, "Forcing it to stop")
+ self.__hbproc.send_signal(SIGKILL)
+ if self.__hbproc.poll() == None:
+ time.sleep(2)
self.__hbproc.wait()
os.close(self.__nullfp)