[all-commits] [llvm/llvm-project] 6f8c45: [lit] Cleanly exit on user keyboard interrupt

Julian Lettner via All-commits all-commits at lists.llvm.org
Fri Apr 3 13:04:45 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f8c45067b1d8d18a669302c0a14d37a230fbc42
      https://github.com/llvm/llvm-project/commit/6f8c45067b1d8d18a669302c0a14d37a230fbc42
  Author: Julian Lettner <julian.lettner at gmail.com>
  Date:   2020-04-03 (Fri, 03 Apr 2020)

  Changed paths:
    M llvm/utils/lit/lit/main.py
    M llvm/utils/lit/lit/run.py
    M llvm/utils/lit/lit/util.py
    M llvm/utils/lit/lit/worker.py

  Log Message:
  -----------
  [lit] Cleanly exit on user keyboard interrupt

Graceful lit shutdown on user keyboard interrupt [Ctrl+C] was a
longstanding goal of mine.  After a few refactorings this revision
finally enables it.  We use the following strategy to deal with
KeyboardInterrupt:
https://noswap.com/blog/python-multiprocessing-keyboardinterrupt

Printing of a helpful summary for interrupted runs (just as the one for
completed runs) will be tackled in future revisions.

Reviewed By: serge-sans-paille, rnk

Differential Revision: https://reviews.llvm.org/D77365




More information about the All-commits mailing list