Remove waitpid on UnMount
Since we no longer have the Fuse Daemon, we won't ever
need to stop the daemon when unmounting.
Bug: 33808187
Test: Run "adb shell ps | grep -w Z"
The sdcard daemon should not be listed.
Change-Id: I6bb9341785b711d81553393f7c3b56115c435236
diff --git a/EmulatedVolume.cpp b/EmulatedVolume.cpp
index 71eaa3e..6fa66d5 100644
--- a/EmulatedVolume.cpp
+++ b/EmulatedVolume.cpp
@@ -105,8 +105,8 @@
usleep(50000); // 50ms
}
/* 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;
}
@@ -121,12 +121,6 @@
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());