Skip to content

Commit ce3ed51

Browse files
committed
swift-reflection-test: Don't leave test process hanging
1 parent bd6d657 commit ce3ed51

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tools/swift-reflection-test/swift-reflection-test.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,15 +417,14 @@ static int doDumpHeapInstance(std::string BinaryFilename) {
417417

418418
error = mach_port_deallocate(mach_task_self(), childPort);
419419
guardMachError(error, "mach_port_deallocate");
420-
exit(EXIT_SUCCESS);
421420
}
422421
}
423422

423+
kill(pid, SIGTERM);
424+
424425
error = task_set_bootstrap_port(mach_task_self(), bootstrap_port);
425426
guardMachError(error, "reset task_set_bootstrap_port");
426427

427-
kill(pid, SIGTERM);
428-
429428
error = mach_port_deallocate(mach_task_self(), childPort);
430429
guardMachError(error, "mach_port_deallocate");
431430

0 commit comments

Comments
 (0)