[lit] Try to exit more cleanly
authorReid Kleckner <rnk@google.com>
Tue, 2 May 2017 17:45:16 +0000 (17:45 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 2 May 2017 17:45:16 +0000 (17:45 +0000)
commitc1f8d7a1691632ec117817b3a127caea780190d9
treefab73010804bc97e0e81133acec821d25130f4a1
parentba1c91564b69ce6d5cee6524fe6d46f280102ff4
[lit] Try to exit more cleanly

If all jobs complete successfully, use pool.close() instead of
pool.terminate() before waiting for the workers. Zach Turner reported
that he was getting "access denied" exceptions from pool.terminate().

Make the workers abort immediately without printing to stderr when they
are interrupted.

Finally, catch exceptions when attempting to remove our temporary
testing directory. On abnormal exit, there can often be open handles
that haven't been cleaned up yet.

llvm-svn: 301941
llvm/utils/lit/lit/main.py
llvm/utils/lit/lit/run.py