Fix PHP extension segfault

pull/19147/head
Stanley Cheung 6 years ago
parent 75475f0908
commit 13011a9787
  1. 4
      src/php/ext/grpc/php_grpc.c

@ -205,7 +205,9 @@ void register_fork_handlers() {
void apply_ini_settings() {
if (GRPC_G(enable_fork_support)) {
putenv("GRPC_ENABLE_FORK_SUPPORT=1");
char *enable_str = malloc(sizeof("GRPC_ENABLE_FORK_SUPPORT=1"));
strcpy(enable_str, "GRPC_ENABLE_FORK_SUPPORT=1");
putenv(enable_str);
}
if (GRPC_G(poll_strategy)) {

Loading…
Cancel
Save