Commit 3f27d2a6 authored by Robert Goldman's avatar Robert Goldman
Browse files

Merge branch 'run-program-errors' into 'master'

Complete branches in %NORMALIZE-IO-SPECIFIER.

Per comments in !46 I think there is a danger that `%NORMALIZE-IO-SPECIFIER` could inappropriately return `NIL` when there is an unexpected set of `*FEATURES*`.

I'll try to have a look and see if there are other cases like this.  Elias, will you have a peek at what I've done here?

See merge request !49
parents 5974da1d 1406eb9d
...@@ -385,7 +385,7 @@ or whether it's already taken care of by the implementation's underlying run-pro ...@@ -385,7 +385,7 @@ or whether it's already taken care of by the implementation's underlying run-pro
"Normalizes a portable I/O specifier for LAUNCH-PROGRAM into an implementation-dependent "Normalizes a portable I/O specifier for LAUNCH-PROGRAM into an implementation-dependent
argument to pass to the internal RUN-PROGRAM" argument to pass to the internal RUN-PROGRAM"
(declare (ignorable role)) (declare (ignorable role))
(etypecase specifier (typecase specifier
(null (or #+(or allegro lispworks) (null-device-pathname))) (null (or #+(or allegro lispworks) (null-device-pathname)))
(string (parse-native-namestring specifier)) (string (parse-native-namestring specifier))
(pathname specifier) (pathname specifier)
...@@ -394,12 +394,21 @@ argument to pass to the internal RUN-PROGRAM" ...@@ -394,12 +394,21 @@ argument to pass to the internal RUN-PROGRAM"
((eql :interactive) ((eql :interactive)
#+allegro nil #+allegro nil
#+clisp :terminal #+clisp :terminal
#+(or abcl clozure cmucl ecl mkcl sbcl scl) t) #+(or abcl clozure cmucl ecl mkcl sbcl scl) t
#+(or abcl allegro clozure cmucl ecl lispworks mkcl sbcl scl) #-(or abcl clozure cmucl ecl mkcl sbcl scl allegro clisp)
(not-implemented-error :interactive-output
"On this lisp implementation, cannot interpret ~a value of ~a"
specifier role))
((eql :output) ((eql :output)
(if (eq role :error-output) (if (eq role :error-output)
:output (or
(error "Wrong specifier ~S for role ~S" specifier role))))) #+(or abcl allegro clozure cmucl ecl lispworks mkcl sbcl scl) :output
(not-implemented-error :error-output-redirect
"Can't send ~a to ~a on this lisp implementation."
role specifier))))
(otherwise
(parameter-error "Incorrect I/O specifier ~S for ~S"
specifier role))))
(defun %interactivep (input output error-output) (defun %interactivep (input output error-output)
(member :interactive (list input output error-output))) (member :interactive (list input output error-output)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment