From 491d97546c54ad1192968bbf8505d0db6e3b983e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 28 Nov 2016 10:39:00 -0800 Subject: Fix subprocess code to avoid redundant calls to waitpid(). --- src/core/lib/support/subprocess_posix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/lib/support/subprocess_posix.c b/src/core/lib/support/subprocess_posix.c index 4f4de9298e..daf371d03e 100644 --- a/src/core/lib/support/subprocess_posix.c +++ b/src/core/lib/support/subprocess_posix.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -52,7 +53,7 @@ struct gpr_subprocess { int pid; - int joined; + bool joined; }; const char *gpr_subprocess_binary_extension() { return ""; } @@ -100,6 +101,7 @@ retry: gpr_log(GPR_ERROR, "waitpid failed: %s", strerror(errno)); return -1; } + p->joined = true; return status; } -- cgit v1.2.3