From 4dc3f44078c339379deac5d9e1765197fd2bf11f Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tunes@google.com> Date: Wed, 8 Jan 2014 16:15:06 -0500 Subject: [PATCH] When possible, use pipe-exit-status on LispWorks, not the deprecated pid-exit-status. --- uiop/run-program.lisp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/uiop/run-program.lisp b/uiop/run-program.lisp index 7f34e185..3ec8a8fd 100644 --- a/uiop/run-program.lisp +++ b/uiop/run-program.lisp @@ -579,7 +579,14 @@ It returns a process-info plist with possible keys: #+clozure (nth-value 1 (ccl:external-process-status process)) #+(or cmu scl) (ext:process-exit-code process) #+ecl (nth-value 1 (ext:external-process-status process)) - #+lispworks (system:pid-exit-status process :wait t) + #+lispworks + (if-let ((stream (or (getf process-info :input-stream) + (getf process-info :output-stream) + (getf process-info :bidir-stream) + (getf process-info :error-stream)))) + (system:pipe-exit-status stream :wait t) + (if-let ((f (find-symbol* :pid-exit-status :system nil))) + (funcall f process :wait t))) #+sbcl (sb-ext:process-exit-code process))))) (defun %check-result (exit-code &key command process ignore-error-status) -- GitLab