Permalink
Browse files

Check whether waitpid was interrupted

If errno is EINTR we should continue waiting for process termination
  • Loading branch information...
1 parent 818f464 commit a83d0bcb351c45a739a815b7bac18ee71fa7d07c @anatol anatol committed Sep 15, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/mount_darwin.c
View
@@ -416,9 +416,10 @@ static bool check_kext_version(bool quiet_mode)
_exit(errno);
}
} else {
- if (waitpid(pid, &result, 0) == -1) {
+ while ((waitpid(pid, &result, 0) == -1) && (errno == EINTR)) {};
+
+ if (result == -1) {
perror("waitpid");
- result = -1;
}
}

0 comments on commit a83d0bc

Please sign in to comment.