def run_and_timeout(self):
"""Run subprocess
Returns
-------
out : int
Exit code of subprocess
"""
self.start()
self.join(self.timeout)
if self.is_alive():
os.killpg(self.p.pid, signal.SIGTERM)
self.join()
print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
print(self.cmd)
print('Has run out of time')
print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
raise RuntimeError("3D-RISM calc didn't finish in time.")
评论列表
文章目录