swift-reflection-test: Don't leave test process hanging

This commit is contained in:
David Farler
2016-03-04 13:25:42 -08:00
parent bd6d657411
commit ce3ed51485

View File

@@ -417,15 +417,14 @@ static int doDumpHeapInstance(std::string BinaryFilename) {
error = mach_port_deallocate(mach_task_self(), childPort);
guardMachError(error, "mach_port_deallocate");
exit(EXIT_SUCCESS);
}
}
kill(pid, SIGTERM);
error = task_set_bootstrap_port(mach_task_self(), bootstrap_port);
guardMachError(error, "reset task_set_bootstrap_port");
kill(pid, SIGTERM);
error = mach_port_deallocate(mach_task_self(), childPort);
guardMachError(error, "mach_port_deallocate");