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>
(cherry picked from commit
edd5497c2027818aebba2c5eb28c9b27eb0d3efa)
ret = -1
else:
ret = 0
+
+ # kill the process, that has exceeded the timeout
+ subproc.kill()
else:
out, err = subproc.communicate()
ret = subproc.returncode