Changeset 14235


Ignore:
Timestamp:
11/09/12 14:43:24 (8 years ago)
Author:
Mark Evenson
Message:

RUN-PROGRAM: refactor symbols and improve docstring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/run-program.lisp

    r14121 r14235  
    4545;;; processes.
    4646;;; <http://download.oracle.com/javase/6/docs/api/java/lang/ProcessBuilder.html>.
    47 (defun run-program (program args &key environment (wait t) clear-env)
     47(defun run-program (program args &key environment (wait t) clear-environment)
     48  "Run PROGRAM with ARGS in with ENVIRONMENT variables.
     49Possibly WAIT for subprocess to exit.
     50
     51Optionally CLEAR-ENVIRONMENT of the subprocess of any non specified values."
    4852  ;;For documentation, see below.
    49   (let ((pb (%make-process-builder program args)))
    50     (let ((env-map (%process-builder-environment pb)))
    51       (when clear-env
     53  (let* ((program-namestring (namestring (pathname program)))
     54
     55         (process-builder (%make-process-builder program-namestring args)))
     56    (let ((env-map (%process-builder-environment process-builder)))
     57      (when clear-environment
    5258        (%process-builder-env-clear env-map))           
    5359      (when environment
     
    5662                                    (princ-to-string (car entry))
    5763                                    (princ-to-string (cdr entry))))))
    58     (let ((process (make-process (%process-builder-start pb))))
     64    (let ((process (make-process (%process-builder-start process-builder))))
    5965      (when wait (process-wait process))
    6066      process)))
Note: See TracChangeset for help on using the changeset viewer.