From cea9a4687230e216085b2d111d7ce0a30494dbb9 Mon Sep 17 00:00:00 2001 From: eriedaberrie Date: Mon, 11 Nov 2024 19:57:16 -0800 Subject: [PATCH] fix: sync-music: use unwind-protect in with-ignore-stderr --- sync-music/libcue/libcue.lisp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sync-music/libcue/libcue.lisp b/sync-music/libcue/libcue.lisp index 6a461a4..284b498 100644 --- a/sync-music/libcue/libcue.lisp +++ b/sync-music/libcue/libcue.lisp @@ -20,10 +20,9 @@ Only works on Unix systems with a /dev/fd/ filesystem." `(progn (finish-output *error-output*) (let ((,old-stderr (dup +stderr-fileno+))) - (prog1 - (progn - (freopen "/dev/null" "w" +stderr+) - ,@body) + (freopen "/dev/null" "w" +stderr+) + (unwind-protect + (progn ,@body) (freopen (format nil "/dev/fd/~D" ,old-stderr) "a" +stderr+))))) #-unix `(progn ,@body))