1 ## Show that SIGINT and similar signals don't cause crash messages to be
3 # RUN: %python %s wrapper llvm-symbolizer 2> %t.err
4 # RUN: count 0 < %t.err
13 proc = subprocess.Popen([sys.argv[2]], stdout=subprocess.PIPE, stdin=subprocess.PIPE)
14 # Write then read some output to ensure the process has started fully.
15 proc.stdin.write(b'foo bar\n')
17 proc.stdout.readline()
18 # Windows handles signals differently.
20 os.kill(0, signal.CTRL_BREAK_EVENT)
22 proc.send_signal(signal.SIGINT)
24 # On Windows, this function spawns the subprocess in its own (hidden) console,
25 # so that signals do not interfere with the calling test. This isn't necessary
28 args = [sys.executable, __file__, 'symbolizer'] + sys.argv[2:]
30 startupinfo = subprocess.STARTUPINFO()
31 startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
32 proc = subprocess.Popen(args,
34 startupinfo=startupinfo,
35 creationflags=subprocess.CREATE_NEW_CONSOLE)
37 proc = subprocess.Popen(args,
38 stderr=subprocess.PIPE)
40 if sys.argv[1] == 'wrapper':