Lazy unmount postinstall if it fails to unmount.
If postinstall forks a new child that's not killed when killing the main postinstall process or if postinstall makes any other running process to hold a file descriptor open in the mounted filesystem, the filesystem is busy an we can't unmount /postinstall. Since the postinstall mountpoint is fix in Android, we need to force a lazy unmount in order for the process to succeed in a future run. This case can only occur when canceling an update during postinstall (for example if the update was retried from the server) and would otherwise clear itself after a few unmount retries if the process using the fd stops using it. Bug: 31021934 Test: Added native tests to excersice this case. (cherry picked from commit 5ba93ad4) Change-Id: I3464377b43e2ee79cd7318dbc9d3a62706c6ea6c
Loading
Please sign in to comment