Merge "Avoid to call UI functions in child process" am: 0f275ae56e am: 5fa2e576f9
am: 15ab95bb63
Change-Id: Ifedf5d53d6ff11ecfeda4a8a1fe7f4e802c9e152
diff --git a/install.cpp b/install.cpp
index 553ebae..248a133 100644
--- a/install.cpp
+++ b/install.cpp
@@ -382,7 +382,11 @@
umask(022);
close(pipefd[0]);
execv(chr_args[0], const_cast<char**>(chr_args));
- PLOG(ERROR) << "Can't run " << chr_args[0];
+ // Bug: 34769056
+ // We shouldn't use LOG/PLOG in the forked process, since they may cause
+ // the child process to hang. This deadlock results from an improperly
+ // copied mutex in the ui functions.
+ fprintf(stdout, "E:Can't run %s (%s)\n", chr_args[0], strerror(errno));
_exit(-1);
}
close(pipefd[1]);