aboutsummaryrefslogtreecommitdiff
path: root/src/main.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.lisp')
-rw-r--r--src/main.lisp32
1 files changed, 21 insertions, 11 deletions
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)))))