Index: tools/ipc_fuzzer/replay/replay_process.cc |
diff --git a/tools/ipc_fuzzer/replay/replay_process.cc b/tools/ipc_fuzzer/replay/replay_process.cc |
index 500e4d4779a3a3d428fc23f2e8f1c2e4ebcc14ef..af2b00925025ed0d78bfd67ffabc2469a51d32cb 100644 |
--- a/tools/ipc_fuzzer/replay/replay_process.cc |
+++ b/tools/ipc_fuzzer/replay/replay_process.cc |
@@ -25,6 +25,11 @@ ReplayProcess::ReplayProcess() |
ReplayProcess::~ReplayProcess() { |
channel_.reset(); |
+ |
+ // Signal this event before shutting down the service process. That way all |
+ // background threads can cleanup. |
+ shutdown_event_.Signal(); |
+ io_thread_.Stop(); |
} |
bool ReplayProcess::Initialize(int argc, const char** argv) { |
@@ -44,9 +49,12 @@ bool ReplayProcess::Initialize(int argc, const char** argv) { |
io_thread_.StartWithOptions( |
base::Thread::Options(base::MessageLoop::TYPE_IO, 0)); |
+#if defined(OS_POSIX) |
base::GlobalDescriptors* g_fds = base::GlobalDescriptors::GetInstance(); |
g_fds->Set(kPrimaryIPCChannel, |
kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor); |
+#endif |
+ |
return true; |
} |