Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 860ba643 authored by Martijn Coenen's avatar Martijn Coenen
Browse files

Abort FUSE filesystems during shutdown.

To ensure we can shutdown cleanly, and don't hang an outstanding
requests to a FUSE host daemon that has already exited.

Bug: 153411204
Test: inspect logs during shutdown
Change-Id: I8e6479bd54dbc1fc85b087617aa6b16be9f15a3b
parent dd0440f4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -678,9 +678,12 @@ static void DoReboot(unsigned int cmd, const std::string& reason, const std::str
    // Reap subcontext pids.
    ReapAnyOutstandingChildren();

    // 3. send volume shutdown to vold
    // 3. send volume abort_fuse and volume shutdown to vold
    Service* vold_service = ServiceList::GetInstance().FindService("vold");
    if (vold_service != nullptr && vold_service->IsRunning()) {
        // Manually abort FUSE connections, since the FUSE daemon is already dead
        // at this point, and unmounting it might hang.
        CallVdc("volume", "abort_fuse");
        CallVdc("volume", "shutdown");
        vold_service->Stop();
    } else {