diff options
author | Paul Lawrence <paullawrence@google.com> | 2014-09-17 14:13:11 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-17 14:13:11 +0000 |
commit | 40b34524bb05cdc6664ba27770c2ca4499280d28 (patch) | |
tree | 1d15716db82db0eb0e3c1e4043dbc35b7065a5d7 /init | |
parent | aa3ed7844a60b08fda8dc6ad371b60612347eeb4 (diff) | |
parent | 40af09297f9d60a3cfd4a186ff294cef6255a9df (diff) | |
download | system_core-40b34524bb05cdc6664ba27770c2ca4499280d28.zip system_core-40b34524bb05cdc6664ba27770c2ca4499280d28.tar.gz system_core-40b34524bb05cdc6664ba27770c2ca4499280d28.tar.bz2 |
am 40af0929: Fix charger mode on first boot of force encrypt devices
* commit '40af09297f9d60a3cfd4a186ff294cef6255a9df':
Fix charger mode on first boot of force encrypt devices
Diffstat (limited to 'init')
-rw-r--r-- | init/builtins.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/init/builtins.c b/init/builtins.c index de83c93..8dbaab7 100644 --- a/init/builtins.c +++ b/init/builtins.c @@ -515,7 +515,12 @@ int do_mount_all(int nargs, char **args) pid = fork(); if (pid > 0) { /* 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)) { ret = WEXITSTATUS(status); } else { |