Some commands, like 'cgrulesengd' in non-daemon mode, continue running
until explicitly terminated. Currently, we catch exceptions for timeouts
but do not terminate the lingering process. This patch ensures that such
processes are properly killed after the timeout.
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
ret = -1
else:
ret = 0
+
+ # kill the process, that has exceeded the timeout
+ subproc.kill()
else:
out, err = subproc.communicate()
ret = subproc.returncode