Kill apps using storage through bind mounts.
When unmounting an emulated volume, look for apps with open files
using the final published volume path.
Without this change, we were only looking at the internal paths
used for runtime permissions, which apps never use directly. This
meant we'd always fail to unmount the volume if apps didn't respect
the EJECTING broadcast, and volume migration would end up wedged
until the device rebooted.
Bug: 24863778
Change-Id: Ibda484e66ab95744c304c344b226caa5b10b7e2e
diff --git a/Process.h b/Process.h
index 81b5f18..62a9313 100644
--- a/Process.h
+++ b/Process.h
@@ -21,7 +21,7 @@
class Process {
public:
- static void killProcessesWithOpenFiles(const char *path, int signal);
+ static int killProcessesWithOpenFiles(const char *path, int signal);
static int getPid(const char *s);
static int checkSymLink(int pid, const char *path, const char *name);
static int checkFileMaps(int pid, const char *path);