From 50915cdb6080aff3f0c29a369efd29aa5e47e5f2 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 18 Jul 2021 22:33:02 -0700 Subject: UNWIND-PROTECT-IN-PARENT -> UNWIND-PROTECT No longer needed thanks to f4e9170e73cb4bcfa7328422b4ff4f72d1339dd0. Signed-off-by: Sean Whitton --- src/property/disk.lisp | 2 +- src/property/installer.lisp | 14 +++++++------- src/property/service.lisp | 7 +++---- 3 files changed, 11 insertions(+), 12 deletions(-) (limited to 'src/property') diff --git a/src/property/disk.lisp b/src/property/disk.lisp index dea18f8..3fa97ee 100644 --- a/src/property/disk.lisp +++ b/src/property/disk.lisp @@ -759,7 +759,7 @@ must not be modified." (apply #'open-volumes-and-contents `(,volumes ,@(and mount-below-supplied-p `(:mount-below ,mount-below))))) - (unwind-protect-in-parent (propappapply propapp) + (unwind-protect (propappapply propapp) (mrun "sync") (mapc #'close-volume (get-connattr :opened-volumes))))) :args (cdr propapp))) diff --git a/src/property/installer.lisp b/src/property/installer.lisp index 0196438..f5a3806 100644 --- a/src/property/installer.lisp +++ b/src/property/installer.lisp @@ -158,13 +158,13 @@ using a combinator like ON-CHANGE, or applied manually with DEPLOY-THESE." ;;; Another option would be a new SERVICES:WITHOUT-STARTING-SERVICES-UNTIL-END ;;; which would disable starting services and push the cleanup forms inside ;;; the definition of SERVICES:WITHOUT-STARTING-SERVICES to *AT-END-FUNCTIONS* -;;; in a closure. We'd also want %CONSFIGURE to use UNWIND-PROTECT-IN-PARENT -;;; to ensure that the AT-END functions get run even when there's a nonlocal -;;; exit from %CONSFIGURE's call to PROPAPPAPPLY; perhaps we could pass a -;;; second argument to the AT-END functions indicating whether there was a -;;; non-local transfer of control. REBOOT:REBOOTED-AT-END might only reboot -;;; when there was a normal return from PROPAPPAPPLY, whereas the cleanup -;;; forms from SERVICES:WITHOUT-STARTING-SERVICES would always be evaluated. +;;; in a closure. We'd also want %CONSFIGURE to use UNWIND-PROTECT to ensure +;;; that the AT-END functions get run even when there's a nonlocal exit from +;;; %CONSFIGURE's call to PROPAPPAPPLY; perhaps we could pass a second +;;; argument to the AT-END functions indicating whether there was a non-local +;;; transfer of control. REBOOT:REBOOTED-AT-END might only reboot when there +;;; was a normal return from PROPAPPAPPLY, whereas the cleanup forms from +;;; SERVICES:WITHOUT-STARTING-SERVICES would always be evaluated. (defprop %root-filesystems-flipped :lisp (new-os old-os) (:hostattrs (os:required 'os:linux)) diff --git a/src/property/service.lisp b/src/property/service.lisp index 247cb2d..bf6900c 100644 --- a/src/property/service.lisp +++ b/src/property/service.lisp @@ -88,10 +88,9 @@ properties." ;; past. (SLEEP 1) is only approximately one second so ;; check that it's actually been a second. (loop do (sleep 1) until (> (get-universal-time) before)) - (unwind-protect-in-parent - (with-preserve-hostattrs - (push-hostattrs :no-services t) - (propappapply propapp)) + (unwind-protect (with-preserve-hostattrs + (push-hostattrs :no-services t) + (propappapply propapp)) (if already-exists ;; Check whether some property we applied set the ;; contents of /usr/sbin/policy-rc.d, in which case -- cgit v1.2.3