diff --git a/libcxx/utils/run.py b/libcxx/utils/run.py --- a/libcxx/utils/run.py +++ b/libcxx/utils/run.py @@ -16,10 +16,10 @@ import argparse import os import platform +import signal import subprocess import sys - def main(): parser = argparse.ArgumentParser() parser.add_argument('--execdir', type=str, required=True) @@ -54,8 +54,10 @@ env['TEMP'] = os.environ.get('TEMP') # Run the command line with the given environment in the execution directory. - return subprocess.call(commandLine, cwd=args.execdir, env=env, shell=False) - + exitCode = subprocess.call(commandLine, cwd=args.execdir, env=env, shell=False) + if exitCode == -signal.SIGINT: + raise KeyboardInterrupt + return exitCode if __name__ == '__main__': exit(main())