Merge "Remove waitpid on UnMount" am: f6dbba8846

am: 1584dc0d1d

Change-Id: I6c2562f6fc075e8be7db2986e461f2c2dd092650
This commit is contained in:
Daniel Rosenberg 2018-04-03 13:49:04 -07:00 committed by android-build-merger
commit eea3792845
2 changed files with 4 additions and 16 deletions

View file

@ -114,8 +114,8 @@ status_t EmulatedVolume::doMount() {
}
}
/* sdcardfs will have exited already. FUSE will still be running */
if (TEMP_FAILURE_RETRY(waitpid(mFusePid, nullptr, WNOHANG)) == mFusePid)
mFusePid = 0;
TEMP_FAILURE_RETRY(waitpid(mFusePid, nullptr, 0));
mFusePid = 0;
return OK;
}
@ -130,12 +130,6 @@ status_t EmulatedVolume::doUnmount() {
ForceUnmount(mFuseRead);
ForceUnmount(mFuseWrite);
if (mFusePid > 0) {
kill(mFusePid, SIGTERM);
TEMP_FAILURE_RETRY(waitpid(mFusePid, nullptr, 0));
mFusePid = 0;
}
rmdir(mFuseDefault.c_str());
rmdir(mFuseRead.c_str());
rmdir(mFuseWrite.c_str());

View file

@ -211,8 +211,8 @@ status_t PublicVolume::doMount() {
}
}
/* sdcardfs will have exited already. FUSE will still be running */
if (TEMP_FAILURE_RETRY(waitpid(mFusePid, nullptr, WNOHANG)) == mFusePid)
mFusePid = 0;
TEMP_FAILURE_RETRY(waitpid(mFusePid, nullptr, 0));
mFusePid = 0;
return OK;
}
@ -231,12 +231,6 @@ status_t PublicVolume::doUnmount() {
ForceUnmount(mFuseWrite);
ForceUnmount(mRawPath);
if (mFusePid > 0) {
kill(mFusePid, SIGTERM);
TEMP_FAILURE_RETRY(waitpid(mFusePid, nullptr, 0));
mFusePid = 0;
}
rmdir(mFuseDefault.c_str());
rmdir(mFuseRead.c_str());
rmdir(mFuseWrite.c_str());