diff --git a/inferior-shell.asd b/inferior-shell.asd index 494a59d439b53b24082569ea2c4ab2c0a5fef514..a1abfc9ecc00d159d168477dfa7c11f4a573542e 100644 --- a/inferior-shell.asd +++ b/inferior-shell.asd @@ -3,6 +3,7 @@ #+sbcl (require :sb-posix) (defsystem :inferior-shell + :defsystem-depends-on (:asdf-condition-control) :depends-on (:asdf :xcvb-driver :fare-utils :fare-matcher :fare-quasiquote-readtable :fare-mop :alexandria) :description "spawn local or remote processes and shell pipes" :components diff --git a/run-generic.lisp b/run-generic.lisp index d4a54bc3d681625fed0efc51c330241e63301b99..3970914cac050378833dc8d613252666ec330fe2 100644 --- a/run-generic.lisp +++ b/run-generic.lisp @@ -82,29 +82,29 @@ (with-slots (process predicate rest) result (format stream "~A ~A ~A" process predicate rest)))) -; (defgeneric result-or ((result r))) - -; (defgeneric result-and ((result r))) - - (defmethod generic-run-spec ((spec or-spec) input output error predicate rest resume) + (declare (ignorable predicate rest)) (list (make-instance 'result :predicate #'result-or :input input :output output :error error :rest (sequence-processes spec) :resume resume))) (defmethod generic-run-spec ((spec and-spec) input output error predicate rest resume) + (declare (ignorable predicate rest)) (list (make-instance 'result :predicate #'result-and :input input :output output :error error :rest (sequence-processes spec) :resume resume))) (defmethod generic-run-spec ((spec progn-spec) input output error predicate rest resume) + (declare (ignorable predicate rest)) (list (make-instance 'result :predicate nil :input input :output output :error error :rest (sequence-processes spec) :resume resume))) (defmethod generic-run-spec ((spec fork-spec) input output error predicate rest resume) + (declare (ignorable predicate rest resume)) (loop :for p :in (sequence-processes spec) :do (generic-run-spec p input output error nil nil nil)) nil) (defmethod generic-run-spec ((spec pipe-spec) input output error predicate rest resume) + (declare (ignorable predicate rest resume)) (let ((processes (sequence-processes spec)) (r-input) (r-output) diff --git a/run-sbcl.lisp b/run-sbcl.lisp index d879fae1b55dc6509d449e939a45bae811a457c1..63ec437d8f6d7ff447d2deb835083b92b0aa2a34 100644 --- a/run-sbcl.lisp +++ b/run-sbcl.lisp @@ -2,6 +2,10 @@ (in-package :inferior-shell) +(defgeneric result-or (result)) + +(defgeneric result-and (result)) + (defmethod result-or ((r result)) (not (zerop (sb-ext:process-exit-code (result-process r)))))