From: Jens Steinhauser Date: Sun, 27 Sep 2015 12:42:58 +0000 (+0200) Subject: Enable killing of the program with CTRL+C. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=baf990dee2d00ad6c8f2240c1a99ec1ae6a03448;p=sigrok-meter.git Enable killing of the program with CTRL+C. --- diff --git a/sigrok-meter b/sigrok-meter index dc34745..4722feb 100755 --- a/sigrok-meter +++ b/sigrok-meter @@ -24,6 +24,7 @@ import argparse import sigrok.core as sr import sys import textwrap +import signal default_drivers = [('demo:analog_channels=4', 'samplerate=4')] default_loglevel = 2 @@ -87,6 +88,8 @@ def parse_cli(): return args if __name__ == '__main__': + signal.signal(signal.SIGINT, signal.SIG_DFL) + args = parse_cli() import qtcompat