Merge "Remove waitpid on UnMount" am: f6dbba8846
am: 1584dc0d1d
Change-Id: I6c2562f6fc075e8be7db2986e461f2c2dd092650
This commit is contained in:
commit
eea3792845
2 changed files with 4 additions and 16 deletions
|
@ -114,7 +114,7 @@ status_t EmulatedVolume::doMount() {
|
|||
}
|
||||
}
|
||||
/* sdcardfs will have exited already. FUSE will still be running */
|
||||
if (TEMP_FAILURE_RETRY(waitpid(mFusePid, nullptr, WNOHANG)) == mFusePid)
|
||||
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());
|
||||
|
|
|
@ -211,7 +211,7 @@ status_t PublicVolume::doMount() {
|
|||
}
|
||||
}
|
||||
/* sdcardfs will have exited already. FUSE will still be running */
|
||||
if (TEMP_FAILURE_RETRY(waitpid(mFusePid, nullptr, WNOHANG)) == mFusePid)
|
||||
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());
|
||||
|
|
Loading…
Reference in a new issue