Merge "Remove waitpid on UnMount"
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());
diff --git a/PublicVolume.cpp b/PublicVolume.cpp
index 4643a3a..929f587 100644
--- a/PublicVolume.cpp
+++ b/PublicVolume.cpp
@@ -191,8 +191,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;
 }
@@ -211,12 +211,6 @@
     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());