Ticket #216: run-program-sharing.diff
| File run-program-sharing.diff, 2.8 KB (added by danieldickison, 2 years ago) |
|---|
-
level-1/linux-files.lisp
684 684 685 685 (defun get-descriptor-for (object proc close-in-parent close-on-error 686 686 &rest keys &key direction (element-type 'character) 687 (sharing :private) 687 688 &allow-other-keys) 688 689 (etypecase object 689 690 ((eql t) … … 704 705 (make-fd-stream write-pipe 705 706 :direction :output 706 707 :element-type element-type 708 :sharing sharing 707 709 :interactive nil 708 710 :basic t) 709 711 (cons read-pipe close-in-parent) … … 713 715 (make-fd-stream read-pipe 714 716 :direction :input 715 717 :element-type element-type 718 :sharing sharing 716 719 :interactive nil 717 720 :basic t) 718 721 (cons write-pipe close-in-parent) … … 877 880 output (if-output-exists :error) 878 881 (error :output) (if-error-exists :error) 879 882 status-hook (element-type 'character) 883 (sharing :private) 880 884 env) 881 885 "Invoke an external program as an OS subprocess of lisp." 882 886 (declare (ignore pty)) … … 907 911 (multiple-value-setq (in-fd in-stream close-in-parent close-on-error) 908 912 (get-descriptor-for input proc nil nil :direction :input 909 913 :if-does-not-exist if-input-does-not-exist 910 :element-type element-type)) 914 :element-type element-type 915 :sharing sharing)) 911 916 (multiple-value-setq (out-fd out-stream close-in-parent close-on-error) 912 917 (get-descriptor-for output proc close-in-parent close-on-error 913 918 :direction :output 914 919 :if-exists if-output-exists 915 :element-type element-type)) 920 :element-type element-type 921 :sharing sharing)) 916 922 (multiple-value-setq (error-fd error-stream close-in-parent close-on-error) 917 923 (if (eq error :output) 918 924 (values out-fd out-stream close-in-parent close-on-error) 919 925 (get-descriptor-for error proc close-in-parent close-on-error 920 926 :direction :output 921 927 :if-exists if-error-exists 922 :element-type element-type))) 928 :element-type element-type 929 :sharing sharing))) 923 930 (setf (external-process-input proc) in-stream 924 931 (external-process-output proc) out-stream 925 932 (external-process-error proc) error-stream)
