mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-07-06 11:16:15 +09:00
buildman: Don't show a stacktrace on Ctrl-C
When Ctrl-C is pressed, just exited quietly. There is no sense in displaying a stack trace since buildman will always be in the same place: waiting for threads to complete building all the jobs on the queue. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
63781bd65e
commit
2f2566482f
|
@ -12,6 +12,7 @@ import os
|
||||||
import re
|
import re
|
||||||
import Queue
|
import Queue
|
||||||
import shutil
|
import shutil
|
||||||
|
import signal
|
||||||
import string
|
import string
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
@ -282,11 +283,17 @@ class Builder:
|
||||||
ignore_lines = ['(make.*Waiting for unfinished)', '(Segmentation fault)']
|
ignore_lines = ['(make.*Waiting for unfinished)', '(Segmentation fault)']
|
||||||
self.re_make_err = re.compile('|'.join(ignore_lines))
|
self.re_make_err = re.compile('|'.join(ignore_lines))
|
||||||
|
|
||||||
|
# Handle existing graceful with SIGINT / Ctrl-C
|
||||||
|
signal.signal(signal.SIGINT, self.signal_handler)
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
"""Get rid of all threads created by the builder"""
|
"""Get rid of all threads created by the builder"""
|
||||||
for t in self.threads:
|
for t in self.threads:
|
||||||
del t
|
del t
|
||||||
|
|
||||||
|
def signal_handler(self, signal, frame):
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
def SetDisplayOptions(self, show_errors=False, show_sizes=False,
|
def SetDisplayOptions(self, show_errors=False, show_sizes=False,
|
||||||
show_detail=False, show_bloat=False,
|
show_detail=False, show_bloat=False,
|
||||||
list_error_boards=False, show_config=False):
|
list_error_boards=False, show_config=False):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user