|
|
|
@ -18,15 +18,19 @@
|
|
|
|
|
(apply *start-thunk* nil)
|
|
|
|
|
(format t "external process running~%")
|
|
|
|
|
|
|
|
|
|
; wait for stop signal
|
|
|
|
|
(let* ((socket (ccl:make-socket :local-port *shutdown-port* :connect :passive))
|
|
|
|
|
(stream (ccl:accept-connection socket))) ; wait for anything
|
|
|
|
|
(close stream)
|
|
|
|
|
(close socket))
|
|
|
|
|
|
|
|
|
|
(format t "stopping external process~%")
|
|
|
|
|
(apply *stop-thunk* nil)
|
|
|
|
|
(format t "external process stopped~%stopping swank~%")
|
|
|
|
|
(swank:stop-server *swank-port*)
|
|
|
|
|
(format t "swank stopped~%")
|
|
|
|
|
(ccl:with-open-socket (socket :connect :passive
|
|
|
|
|
:format :text
|
|
|
|
|
:local-port *shutdown-port*
|
|
|
|
|
:reuse-address t)
|
|
|
|
|
(with-open-stream (stream (ccl:accept-connection socket))
|
|
|
|
|
(format t "stopping external process~%")
|
|
|
|
|
(apply *stop-thunk* nil)
|
|
|
|
|
(format t "external process stopped~%stopping swank~%")
|
|
|
|
|
(swank:stop-server *swank-port*)
|
|
|
|
|
(format t "swank stopped~%")
|
|
|
|
|
(princ "server shutdown complete" stream)))
|
|
|
|
|
|
|
|
|
|
(ccl:quit))
|
|
|
|
|
|
|
|
|
|
(defparameter socket (ccl:make-socket :local-port 6200 :connect :passive))
|
|
|
|
|
(defparameter stream (ccl:accept-connection socket))
|
|
|
|
|