Fix charger mode on first boot of force encrypt devices
waitpid breaks whenever child status signals. Need to loop, continuing on errno EINTR Bug: 17515976 Change-Id: Ibb29056a38b3c90dc7904de8c6aedb5a362e511d
This commit is contained in:
parent
81b857f3a2
commit
40af09297f
1 changed files with 6 additions and 1 deletions
|
|
@ -515,7 +515,12 @@ int do_mount_all(int nargs, char **args)
|
||||||
pid = fork();
|
pid = fork();
|
||||||
if (pid > 0) {
|
if (pid > 0) {
|
||||||
/* Parent. Wait for the child to return */
|
/* Parent. Wait for the child to return */
|
||||||
waitpid(pid, &status, 0);
|
int wp_ret = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0));
|
||||||
|
if (wp_ret < 0) {
|
||||||
|
/* Unexpected error code. We will continue anyway. */
|
||||||
|
NOTICE("waitpid failed rc=%d, errno=%d\n", wp_ret, errno);
|
||||||
|
}
|
||||||
|
|
||||||
if (WIFEXITED(status)) {
|
if (WIFEXITED(status)) {
|
||||||
ret = WEXITSTATUS(status);
|
ret = WEXITSTATUS(status);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue