diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-04-01 23:52:37 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-04-02 12:27:32 -0700 |
commit | 1a6f6335df30cf11599c7f609b8716cebe3b04a0 (patch) | |
tree | 3923aa00b985161747064e99f9d1d0145164923e /src/connection | |
parent | f4714132d3dc07393150365879aca9731d3112db (diff) | |
download | consfigurator-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.lisp | 42 |
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 |