/proc/mounts uses octal escaping for special characters (e.g. \040 for
spaces). Decode with printf before passing to fusermount so paths with
spaces are handled correctly.
Add disown after backgrounding the gvfs restart so it survives
systemd-sleep's cgroup cleanup when the hook script exits.
The post-sleep hook runs before systemd thaws user.slice, so a
synchronous systemctl --user restart hangs for ~90 seconds waiting
for the frozen user manager to respond — blocking the entire resume.
Background the restart with a short delay so it executes after
user.slice is thawed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gvfsd-fuse is spawned by gvfsd during init and not respawned if it
dies. After lazy-unmounting in pre-sleep, restart gvfs-daemon.service
in post-sleep so the FUSE mount at /run/user/*/gvfs is restored.