diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-05-15 14:20:44 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-05-15 14:20:44 -0700 |
commit | fbac5f17b71cb2fc6b3b8f377dc1b896fdf952e0 (patch) | |
tree | 449c7f89f8aecdfaab61e1fd55df1568e56e0cb3 /src/core/support | |
parent | 685f1e625553c5158280761d3b91c8875166f394 (diff) |
Crash handling test
Diffstat (limited to 'src/core/support')
-rw-r--r-- | src/core/support/subprocess_posix.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/support/subprocess_posix.c b/src/core/support/subprocess_posix.c index 4580537aa8..327c476b16 100644 --- a/src/core/support/subprocess_posix.c +++ b/src/core/support/subprocess_posix.c @@ -57,7 +57,7 @@ struct gpr_subprocess { char *gpr_subprocess_binary_extension() { return ""; } -gpr_subprocess *gpr_subprocess_create(int argc, char **argv) { +gpr_subprocess *gpr_subprocess_create(int argc, const char **argv) { gpr_subprocess *r; int pid; char **exec_args; @@ -92,7 +92,11 @@ void gpr_subprocess_destroy(gpr_subprocess *p) { int gpr_subprocess_join(gpr_subprocess *p) { int status; +retry: if (waitpid(p->pid, &status, 0) == -1) { + if (errno == EINTR) { + goto retry; + } gpr_log(GPR_ERROR, "waitpid failed: %s", strerror(errno)); return -1; } |