Merge pull request #17996 from ericgribkoff/another_fork_fix

grpc_prefork(): check grpc_is_initialized before creating execctx
pull/17792/head
Eric Gribkoff 6 years ago committed by GitHub
commit 236d214574
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/core/lib/iomgr/fork_posix.cc

@ -47,11 +47,13 @@ bool registered_handlers = false;
} // namespace
void grpc_prefork() {
grpc_core::ExecCtx exec_ctx;
skipped_handler = true;
// This may be called after core shuts down, so verify initialized before
// instantiating an ExecCtx.
if (!grpc_is_initialized()) {
return;
}
grpc_core::ExecCtx exec_ctx;
if (!grpc_core::Fork::Enabled()) {
gpr_log(GPR_ERROR,
"Fork support not enabled; try running with the "

Loading…
Cancel
Save