diff options
author | Treehugger Robot | 2017-02-03 16:06:49 -0600 |
---|---|---|
committer | Gerrit Code Review | 2017-02-03 16:06:50 -0600 |
commit | 0f275ae56e2017db5ba2a712f84b710e8a9de99e (patch) | |
tree | 142570fc6ca714cb049538cbf13e8660cc617530 /install.cpp | |
parent | c44c4791979a4b2d87ef6b37dc1f7c3439425ddc (diff) | |
parent | ab1abae59ccca2b5f1685ab7d279a0273ff9278b (diff) | |
download | platform-bootable-recovery-0f275ae56e2017db5ba2a712f84b710e8a9de99e.tar.gz platform-bootable-recovery-0f275ae56e2017db5ba2a712f84b710e8a9de99e.tar.xz platform-bootable-recovery-0f275ae56e2017db5ba2a712f84b710e8a9de99e.zip |
Merge "Avoid to call UI functions in child process"
Diffstat (limited to 'install.cpp')
-rw-r--r-- | install.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/install.cpp b/install.cpp index 959a7422..91e4875c 100644 --- a/install.cpp +++ b/install.cpp | |||
@@ -382,7 +382,11 @@ static int try_update_binary(const char* path, ZipArchiveHandle zip, bool* wipe_ | |||
382 | umask(022); | 382 | umask(022); |
383 | close(pipefd[0]); | 383 | close(pipefd[0]); |
384 | execv(chr_args[0], const_cast<char**>(chr_args)); | 384 | execv(chr_args[0], const_cast<char**>(chr_args)); |
385 | PLOG(ERROR) << "Can't run " << chr_args[0]; | 385 | // Bug: 34769056 |
386 | // We shouldn't use LOG/PLOG in the forked process, since they may cause | ||
387 | // the child process to hang. This deadlock results from an improperly | ||
388 | // copied mutex in the ui functions. | ||
389 | fprintf(stdout, "E:Can't run %s (%s)\n", chr_args[0], strerror(errno)); | ||
386 | _exit(-1); | 390 | _exit(-1); |
387 | } | 391 | } |
388 | close(pipefd[1]); | 392 | close(pipefd[1]); |