aboutsummaryrefslogtreecommitdiff
path: root/src/connection
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-04-01 23:52:37 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-04-02 12:27:32 -0700
commit1a6f6335df30cf11599c7f609b8716cebe3b04a0 (patch)
tree3923aa00b985161747064e99f9d1d0145164923e /src/connection
parentf4714132d3dc07393150365879aca9731d3112db (diff)
downloadconsfigurator-1a6f6335df30cf11599c7f609b8716cebe3b04a0.tar.gz
EVAL-IN-{GRANDCHILD,REINVOKED}: convert from macros to functions
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection')
-rw-r--r--src/connection/fork.lisp42
1 files changed, 22 insertions, 20 deletions
diff --git a/src/connection/fork.lisp b/src/connection/fork.lisp
index 2958a04..ca269df 100644
--- a/src/connection/fork.lisp
+++ b/src/connection/fork.lisp
@@ -26,8 +26,9 @@
Must not start up any threads."))
(defmethod continue-connection ((connection fork-connection) remaining)
- (eval-in-grandchild `(post-fork ,connection)
- `(continue-deploy* ,connection ',remaining) (out err exit)
+ (multiple-value-bind (out err exit)
+ (eval-in-grandchild `(post-fork ,connection)
+ `(continue-deploy* ,connection ',remaining))
(when-let ((lines (lines out)))
(inform t lines))
(return-exit
@@ -59,24 +60,25 @@ single-threaded context for the execution of POST-FORK."))
#+sbcl
(defmethod continue-connection ((connection init-hooks-connection) remaining)
- (eval-in-reinvoked
- `(push
- (lambda ()
- (handler-bind
- ((serious-condition
- (lambda (c)
- (trivial-backtrace:print-backtrace c :output *error-output*)
- (uiop:quit 1))))
- ;; Handle the finaliser thread in older SBCL, before the change in
- ;; 2.1.8 to call *INIT-HOOKS* before starting system threads.
- #+consfigurator.connection.fork::older-sbcl
- (sb-int:with-system-mutex (sb-thread::*make-thread-lock*)
- (sb-impl::finalizer-thread-stop))
- (post-fork ,connection)
- #+consfigurator.connection.fork::older-sbcl
- (sb-impl::finalizer-thread-start)))
- sb-ext:*init-hooks*)
- `(continue-deploy* ,connection ',remaining) (out err exit)
+ (multiple-value-bind (out err exit)
+ (eval-in-reinvoked
+ `(push
+ (lambda ()
+ (handler-bind
+ ((serious-condition
+ (lambda (c)
+ (trivial-backtrace:print-backtrace c :output *error-output*)
+ (uiop:quit 1))))
+ ;; Handle the finaliser thread in older SBCL, before the change in
+ ;; 2.1.8 to call *INIT-HOOKS* before starting system threads.
+ #+consfigurator.connection.fork::older-sbcl
+ (sb-int:with-system-mutex (sb-thread::*make-thread-lock*)
+ (sb-impl::finalizer-thread-stop))
+ (post-fork ,connection)
+ #+consfigurator.connection.fork::older-sbcl
+ (sb-impl::finalizer-thread-start)))
+ sb-ext:*init-hooks*)
+ `(continue-deploy* ,connection ',remaining))
(when-let ((lines (lines out)))
(inform t lines))
(return-exit