Skip to content

Commit 5ac0fe9

Browse files
run_with_preset.py --interactive
1 parent 7e54c4b commit 5ac0fe9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

run_with_preset.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python3
22

33
import os
4+
import signal
45
import subprocess
56
import sys
67

@@ -56,5 +57,12 @@
5657

5758
print(command_list)
5859

59-
result = subprocess.run(command_list)
60-
sys.exit(result.returncode)
60+
sp = subprocess.Popen(command_list)
61+
62+
while sp.returncode is None:
63+
try:
64+
sp.wait()
65+
except KeyboardInterrupt:
66+
pass
67+
68+
sys.exit(sp.returncode)

0 commit comments

Comments
 (0)