summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/login.d/01_xdg.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/.config/login.d/01_xdg.sh b/.config/login.d/01_xdg.sh
index 07cea90..d415608 100644
--- a/.config/login.d/01_xdg.sh
+++ b/.config/login.d/01_xdg.sh
@@ -29,9 +29,10 @@ if [[ -z $XDG_RUNTIME_DIR ]] && type flock &>/dev/null; then
fi
if ! [[ /dev/fd/7 -ef "$XDG_CACHE_HOME/xdg-runtime-dir/.lock" ]]; then
exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/.lock"
- fi
- if flock -sn 7; then
- trap _diy_xdg_runtime_logout EXIT
+ if flock -sn 7; then
+ # Unfortunately this doesn't survive across exec(1).
+ trap _diy_xdg_runtime_logout EXIT
+ fi
fi
}
_diy_xdg_runtime_logout() {