From 9a9e01c9baecf7683d8a52ed022a5c2f749917fa Mon Sep 17 00:00:00 2001 From: Nicolas Porcel Date: Thu, 10 Sep 2026 23:47:40 +0100 Subject: [PATCH] zzz: do not inherit the lock fd when calling hooks This ensures that processes started during the hook and running in the background do not hold the lock after the machine wakes up. fixes #139 --- zzz | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zzz b/zzz index 6a2f8591..b4260255 100755 --- a/zzz +++ b/zzz @@ -44,7 +44,7 @@ flock -n 9 || fail "another instance of zzz is running" printf "Zzzz... " for hook in /etc/zzz.d/suspend/*; do - [ -x "$hook" ] && "$hook" + [ -x "$hook" ] && "$hook" 9<&- done case "$ZZZ_MODE" in @@ -58,7 +58,7 @@ esac ZZZ_MODE=resume for hook in /etc/zzz.d/resume/*; do - [ -x "$hook" ] && "$hook" + [ -x "$hook" ] && "$hook" 9<&- done echo "yawn."