def METHOD_NAME(sig, _frame):
    sys.stderr.write("Interrupting scan!\n")
    # Use same convention as the bash shell
    # 128+n where n is the fatal error signal
    # https://tldp.org/LDP/abs/html/exitcodes.html#EXITCODESREF
    sys.exit(128 + sig)