|
Line 0
Link Here
|
|
|
1 |
--- execution/src/posix/execution.cc.orig 2019-08-10 21:37:06 UTC |
| 2 |
+++ execution/src/posix/execution.cc |
| 3 |
@@ -487,9 +487,14 @@ namespace leatherman { namespace execution { |
| 4 |
kill(-child, SIGKILL); |
| 5 |
} |
| 6 |
// Wait for the child to exit |
| 7 |
- if (waitpid(child, &status, 0) == -1) { |
| 8 |
- LOG_DEBUG(format_error(_("waitpid failed"))); |
| 9 |
- return; |
| 10 |
+ while (waitpid(child, &status, 0) == -1) { |
| 11 |
+ if ( errno == EINTR ) { |
| 12 |
+ LOG_DEBUG(format_error(_("waitpid was interrupted by a signal, retrying"))); |
| 13 |
+ continue; |
| 14 |
+ } else { |
| 15 |
+ LOG_DEBUG(format_error(_("waitpid failed"))); |
| 16 |
+ return; |
| 17 |
+ } |
| 18 |
} |
| 19 |
if (WIFEXITED(status)) { |
| 20 |
status = static_cast<char>(WEXITSTATUS(status)); |