Changeset 7308
- Timestamp:
- Sep 26, 2007, 7:14:02 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/linux-files.lisp
r7265 r7308 839 839 (setq terminated t))))))))) 840 840 841 (defun run-external-process (proc in-fd out-fd error-fd) 841 (defun run-external-process (proc in-fd out-fd error-fd &optional env) 842 ;; type-check the env variable 843 (dolist (pair env) 844 (destructuring-bind (var . val) pair 845 (assert (typep var '(or string symbol character))) 846 (assert (typep val 'string)))) 842 847 (call-with-string-vector 843 848 #'(lambda (argv) … … 846 851 (cond ((zerop child-pid) 847 852 ;; Running in the child; do an exec 853 (dolist (pair env) 854 (setenv (string (car pair)) (cdr pair))) 848 855 (without-interrupts 849 856 (exec-with-io-redirection … … 863 870 output (if-output-exists :error) 864 871 (error :output) (if-error-exists :error) 865 status-hook (element-type 'character)) 872 status-hook (element-type 'character) 873 env) 866 874 "Invoke an external program as an OS subprocess of lisp." 867 875 (declare (ignore pty)) … … 912 920 (format nil "Monitor thread for external process ~a" args) 913 921 914 #'run-external-process proc in-fd out-fd error-fd )922 #'run-external-process proc in-fd out-fd error-fd env) 915 923 (wait-on-semaphore (external-process-signal proc)) 916 924 )
Note: See TracChangeset
for help on using the changeset viewer.