Don't LOG() after fork() and before exec().
LOG() can hang, because another vold thread may have been holding
a libc lock at the time we forked. Simply moving the log line to
before the fork().
Bug: 135341433
Test: atest AdoptableHostTest
Change-Id: I6063eb33f35c835a226bc1e56de97ace426747ff
diff --git a/model/EmulatedVolume.cpp b/model/EmulatedVolume.cpp
index 8224e61..eb6b8a3 100644
--- a/model/EmulatedVolume.cpp
+++ b/model/EmulatedVolume.cpp
@@ -115,8 +115,8 @@
return OK;
}
+ LOG(INFO) << "Executing sdcardfs";
if (!(mFusePid = fork())) {
- LOG(INFO) << "Executing sdcardfs";
// clang-format off
if (execl(kFusePath, kFusePath,
"-u", "1023", // AID_MEDIA_RW