Log errors for unsupported fork scenarios in Python (#28566)

Previously it logged info-level warnings. This also now returns early from prefork if the polling strategy is not set, or otherwise not supported.

See #28557
pull/28608/head
AJ Heller 3 years ago committed by GitHub
parent e59dcd5c87
commit 6b95e9769e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/core/lib/iomgr/fork_posix.cc

@ -67,12 +67,13 @@ void grpc_prefork() {
if (poll_strategy_name == nullptr ||
(strcmp(poll_strategy_name, "epoll1") != 0 &&
strcmp(poll_strategy_name, "poll") != 0)) {
gpr_log(GPR_INFO,
gpr_log(GPR_ERROR,
"Fork support is only compatible with the epoll1 and poll polling "
"strategies");
return;
}
if (!grpc_core::Fork::BlockExecCtx()) {
gpr_log(GPR_INFO,
gpr_log(GPR_ERROR,
"Other threads are currently calling into gRPC, skipping fork() "
"handlers");
return;

Loading…
Cancel
Save