diff --git a/src/core/lib/event_engine/posix_engine/posix_engine.cc b/src/core/lib/event_engine/posix_engine/posix_engine.cc index 09c10810f2409..e1aeb718a9598 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine.cc +++ b/src/core/lib/event_engine/posix_engine/posix_engine.cc @@ -769,7 +769,8 @@ absl::Status PosixEventEngine::HandlePreFork() { LOG(INFO) << "Suspended polling, stopping timer manager."; timer_manager_->PrepareFork(); LOG(INFO) << "Suspended timer manager, stopping thread pool."; - executor_->Quiesce([]() {}); + executor_->PrepareFork(); + CHECK_OK(poller_manager_->Poller()->PrepareForkNew()); #endif // GRPC_PLATFORM_SUPPORTS_POSIX_POLLING return absl::OkStatus(); } diff --git a/test/core/event_engine/posix/posix_system_api_test.cc b/test/core/event_engine/posix/posix_system_api_test.cc index 15945201d0b1f..cffc0eab5b1bf 100644 --- a/test/core/event_engine/posix/posix_system_api_test.cc +++ b/test/core/event_engine/posix/posix_system_api_test.cc @@ -341,6 +341,8 @@ TEST(PosixSystemApiTest, FullStopBeforeFork) { channel = grpc::CreateChannel(target, grpc::InsecureChannelCredentials()); stub = Greeter::NewStub(channel); status = CallSayHello(stub.get()); + EXPECT_FALSE(status.ok()); + status = CallSayHello(stub.get()); EXPECT_TRUE(status.ok()) << status.error_message(); }