| ## Show that SIGINT and similar signals don't cause crash messages to be |
| # RUN: %python %s wrapper llvm-symbolizer 2> %t.err |
| proc = subprocess.Popen([sys.argv[2]], stdout=subprocess.PIPE, stdin=subprocess.PIPE) |
| # Write then read some output to ensure the process has started fully. |
| proc.stdin.write(b'foo\n') |
| # Windows handles signals differently. |
| os.kill(0, signal.CTRL_BREAK_EVENT) |
| proc.send_signal(signal.SIGINT) |
| # On Windows, this function spawns the subprocess in its own (hidden) console, |
| # so that signals do not interfere with the calling test. This isn't necessary |
| args = [sys.executable, __file__, 'symbolizer'] + sys.argv[2:] |
| startupinfo = subprocess.STARTUPINFO() |
| startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW |
| proc = subprocess.Popen(args, |
| creationflags=subprocess.CREATE_NEW_CONSOLE) |
| proc = subprocess.Popen(args, |
| if sys.argv[1] == 'wrapper': |