Skip to content

Commit cb5f48a

Browse files
committed
wasi-testsuite-adapter.py: handle SIGTERM
cf. WebAssembly/wasi-testsuite#83
1 parent 02b9e46 commit cb5f48a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: test/wasi-testsuite-adapter.py

+9
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,17 @@
66
import os
77
import shlex
88
import sys
9+
import signal
910
import subprocess
1011

12+
13+
def handler(a, b):
14+
sys.exit(1) # this terminates subrpocess.run
15+
16+
17+
signal.signal(signal.SIGTERM, handler)
18+
19+
1120
# https://github.com/WebAssembly/wasi-testsuite/pull/46
1221
executable = os.getenv("TEST_RUNTIME_EXE")
1322
if executable is None:

0 commit comments

Comments
 (0)