Skip to content

Commit e832698

Browse files
authored
Merge pull request #32616 from compnerd/exit-stage-right
test: exit properly with `swift_build_sdk_interface`
2 parents 59464c3 + bb3c945 commit e832698

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utils/swift_build_sdk_interfaces.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,10 @@ def main():
416416
non_stdlib_module_files = (
417417
x for x in module_files if x.name != STDLIB_NAME)
418418
status = process_module_files(pool, non_stdlib_module_files)
419+
if os.name == 'nt':
420+
import ctypes
421+
Kernel32 = ctypes.cdll.LoadLibrary("Kernel32.dll")
422+
Kernel32.ExitProcess(ctypes.c_ulong(status))
419423
sys.exit(status)
420424

421425

0 commit comments

Comments
 (0)