CL-USER> (defvar *process*)
*PROCESS*
CL-USER> *process*
; Evaluation aborted on #<UNBOUND-VARIABLE *PROCESS* {1007C4B8C3}>.
CL-USER> (let* ((p (sb-ext:run-program "/usr/bin/R" nil
                                       :output :stream
                                       :error :stream
                                       :input :stream
                                       :wait nil))
                (in (sb-ext:process-input p))
                (s (sb-ext:process-output p)))
           (declare (ignorable s in))
           (prog1
               (with-output-to-string (*standard-output*)
                 (loop :for c = (read-char s nil nil)
                       :repeat 10
                       :while (and c
                                   (if (char/= c #\>)
                                       t
                                       (progn
                                         (write-char c)
                                         nil)))
                       :do (write-char c)))
             (setf *process* p)))
""
CL-USER> *process*
#<SB-IMPL::PROCESS :EXITED 2>
CL-USER> (sb-ext:process-alive-p *process*)
NIL
CL-USER> (lisp-implementation-type)
"SBCL"
CL-USER> (lisp-implementation-version)
"1.3.11.debian"
со всякой мелочью типа /bin/ls проблем нет, хотя она также завершается быстро, но зато как положено и с результатом на выводе.



