From a3a040aa8d5d188b782918129d0c06835303bf63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Thu, 23 Mar 2017 18:09:18 +0100 Subject: [PATCH] run-program: don't shadow original arguments --- src/lsp/process.lsp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lsp/process.lsp b/src/lsp/process.lsp index 04f23b502..2ef1e7b4e 100644 --- a/src/lsp/process.lsp +++ b/src/lsp/process.lsp @@ -137,21 +137,20 @@ #+windows "nul" :direction direction))) - (setf input (process-stream input *standard-input* - :direction :input - :if-does-not-exist if-input-does-not-exist) - output (process-stream output *standard-output* - :direction :output - :if-exists if-output-exists) - error (if (eql error :output) - :output - (process-stream error *error-output* - :direction :output - :if-exists if-error-exists))) - (let ((progname (si:copy-to-simple-base-string command)) (args (prepare-args (cons command argv))) (process (make-external-process)) + (process-input (process-stream input *standard-input* + :direction :input + :if-does-not-exist if-input-does-not-exist)) + (process-output (process-stream output *standard-output* + :direction :output + :if-exists if-output-exists)) + (process-error (if (eql error :output) + :output + (process-stream error *error-output* + :direction :output + :if-exists if-error-exists))) pid parent-write parent-read parent-error) (multiple-value-setq (pid parent-write parent-read parent-error) @@ -166,6 +165,7 @@ (stream-error (when (< 0 parent-error) (make-input-stream-from-fd progname parent-error external-format)))) + (setf (external-process-pid process) pid (external-process-input process) (or stream-write (null-stream :output)) (external-process-output process) (or stream-read (null-stream :input))