diff --git a/llvm/test/Support/interrupts.test b/llvm/test/Support/interrupts.test index 86730f5139c04..752426c5292b0 100644 --- a/llvm/test/Support/interrupts.test +++ b/llvm/test/Support/interrupts.test @@ -10,7 +10,8 @@ import sys import time def run_symbolizer(): - proc = subprocess.Popen([sys.argv[2]], stdout=subprocess.PIPE, stdin=subprocess.PIPE) + proc = subprocess.Popen([sys.argv[2]], stdout=subprocess.PIPE, + stdin=subprocess.PIPE, stderr=sys.stderr) # Write then read some output to ensure the process has started fully. proc.stdin.write(b'foo bar\n') proc.stdin.flush() @@ -29,13 +30,10 @@ def run_wrapper(): if os.name == 'nt': startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - proc = subprocess.Popen(args, - stderr=sys.stderr, - startupinfo=startupinfo, - creationflags=subprocess.CREATE_NEW_CONSOLE) + subprocess.run(args, stderr=sys.stderr, startupinfo=startupinfo, + creationflags=subprocess.CREATE_NEW_CONSOLE) else: - proc = subprocess.Popen(args, - stderr=subprocess.PIPE) + subprocess.run(args, stderr=sys.stderr) if sys.argv[1] == 'wrapper': run_wrapper()