diff --git a/cl/inhibit-sleep-for-audio.lisp b/cl/inhibit-sleep-for-audio.lisp index c6d6839..1dbb026 100644 --- a/cl/inhibit-sleep-for-audio.lisp +++ b/cl/inhibit-sleep-for-audio.lisp @@ -38,13 +38,16 @@ (defun start-inhibitor () "Start the inhibitor process." - (let ((cmd (list "systemd-inhibit" + (let ((cmd (list "die-with-parent" + "-p" (prin1-to-string (sb-posix:getpid)) + "--" + "systemd-inhibit" "--mode=block" "--what=sleep:idle" "--who=inhibit-sleep-for-audio" "--why=PipeWire audio playing or recording" "sleep" - (princ-to-string most-positive-fixnum)))) + "infinity"))) (setq *inhibitor-process* (uiop:launch-program cmd :output "/dev/null")) (debug-format "Started inhibitor process ~S~%" cmd)))