close the pool.

This commit is contained in:
Michael DeHaan 2012-10-24 07:56:23 -04:00
parent 92ce8a0517
commit f1f44843c3

View file

@ -564,10 +564,12 @@ class Runner(object):
p = multiprocessing.Pool(self.forks)
try:
return p.map(_executor_hook, hosts)
result = p.map(_executor_hook, hosts)
p.close()
except KeyboardInterrupt:
p.terminate()
raise errors.AnsibleError("Interrupted")
return result
# *****************************************************