From 0fbe8babab5fb52a7604a797195bce230519b1c4 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Thu, 4 Aug 2022 07:53:52 -0500 Subject: [add] swank support --- src/main.lisp | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'src/main.lisp') diff --git a/src/main.lisp b/src/main.lisp index f0c2ea5..4a94fa9 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -302,6 +302,9 @@ contributors will be made. You should destroy this file after the initial boot up, subsequent boots will not need it, even if it remains mentioned in th config file. +:SWANK-PORT should be a port number (or absent). When present the +startup process attempts to start as swank server on the provided port. + " (handler-case (progn @@ -310,17 +313,24 @@ mentioned in th config file. (with-open-file (input config-file) (read input)))) (with-plist - (port address salt-file domain store-dir init-admins-file) config - ;; start the server with options in the config. - - (apply 'start - (nconc - (when port (list :port port)) - (when salt-file - (list :salt (salt-from-file salt-file))) - (when address (list :address address)) - (when domain (list :domain domain)) - (when store-dir (list :store-dir store-dir)))) + (port address salt-file domain store-dir init-admins-file swank-port) config + ;; when swhank port, start swank + (when swank-port + (bt:make-thread + (lambda () + (swank:create-server + :port swank-port + :dont-close t)))) + + ;; start the server with options in the config. + (apply 'start + (nconc + (when port (list :port port)) + (when salt-file + (list :salt (salt-from-file salt-file))) + (when address (list :address address)) + (when domain (list :domain domain)) + (when store-dir (list :store-dir store-dir)))) ;; make any admins listed. (when init-admins-file (make-admins-from-file init-admins-file))))) -- cgit v1.2.3