driver: Be more robust when borking or otherwise dying.
TODO: ABCL fork hints.
;;; -*- mode: lisp -*-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; ;;;
-;;; Free Software available under an MIT-style license. See LICENSE ;;;
-;;; ;;;
-;;; Copyright (c) 2008-2011 ITA Software, Inc. All rights reserved. ;;;
-;;; Copyright (c) 2012-2012 Google, Inc. All rights reserved. ;;;
-;;; ;;;
-;;; Original authors: Francois-Rene Rideau, Spencer Brody ;;;
-;;; ;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(module
(:fullname "xcvb"
a "load script" backend creating a simple load script.
XCVB could be able to always fall back to some working mode.
+ + For ABCL on Unix, use fork?
+ https://github.com/kohsuke/akuma/blob/master/src/main/java/com/sun/akuma/Daemon.java
+
+ For an optimized XCVB managing its own processes, assume Linux
with SBCL or CCL, maybe if not too hard CLISP.
"Quits from the Lisp world, with the given exit status if provided.
This is designed to abstract away the implementation specific quit forms."
(when *debugging*
- (format! *stderr* "~&Quitting with code ~A~%" code))
+ (ignore-errors
+ (format! *stderr* "~&Quitting with code ~A~%" code)))
(when finish-output ;; essential, for ClozureCL, and for standard compliance.
- (finish-outputs))
+ (ignore-errors
+ (finish-outputs)))
#+(or abcl xcl) (ext:quit :status code)
#+allegro (excl:exit code :quiet t)
#+clisp (ext:quit code)
(defun die (format &rest arguments)
"Die in error with some error message"
- (format! *stderr* "~&")
- (apply #'format! *stderr* format arguments)
- (format! *stderr* "~&")
+ (ignore-errors
+ (format! *stderr* "~&")
+ (apply #'format! *stderr* format arguments)
+ (format! *stderr* "~&"))
(quit 99))
(defun bork (condition)
"Depending on whether *DEBUGGING* is set, enter debugger or die"
- (format! *stderr* "~&BORK:~%~A~%" condition)
+ (ignore-errors
+ (format! *stderr* "~&BORK:~%~A~%" condition))
(cond
(*debugging*
(invoke-debugger condition))
(t
- (print-backtrace *stderr*)
+ (ignore-errors
+ (print-backtrace *stderr*))
(die "~A" condition))))
(defun call-with-coded-exit (thunk)
(when x
(let ((n (native-namestring x)))
(cond
- ((asdf:absolute-pathname-p x) n)
+ ((asdf::absolute-pathname-p x) n)
((asdf::os-unix-p) (format nil "./~A" n))
(t n)))))
;;; -*- mode: lisp -*-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; ;;;
-;;; Free Software available under an MIT-style license. See LICENSE ;;;
-;;; ;;;
-;;; Copyright (c) 2008-2011 ITA Software, Inc. All rights reserved. ;;;
-;;; Copyright (c) 2012-2012 Google, Inc. All rights reserved. ;;;
-;;; ;;;
-;;; Original authors: Spencer Brody, Francois-Rene Rideau ;;;
-;;; ;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package :asdf)
#-asdf2 (error "XCVB requires ASDF 2")
(let ((old-ver (asdf-version)))
(load-system :asdf)
- (let ((min "2.23")
+ (let ((min "2.21")
(ver (asdf-version)))
(unless (or (version-satisfies old-ver "2.014.8") ; first version to do magic upgrade
(equal ver old-ver))