From d8c4da22fc949ecfd79e781fdc08d8142bcd4fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Fri, 17 Feb 2017 16:24:48 +0100 Subject: [PATCH] run-program: use previously prepared arguments --- src/c/unixsys.d | 8 +------- src/lsp/process.lsp | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/c/unixsys.d b/src/c/unixsys.d index da4c105a5..f54979f45 100644 --- a/src/c/unixsys.d +++ b/src/c/unixsys.d @@ -571,12 +571,7 @@ si_run_program_internal(cl_object command, cl_object argv, /* Enclose each argument, as well as the file name in double quotes, to avoid problems when these arguments or file names have spaces */ - command = - cl_format(4, ECL_NIL, - ecl_make_simple_base_string("~A~{ ~A~}", -1), - command, argv); - command = si_copy_to_simple_base_string(command); - command = ecl_null_terminated_base_string(command); + command = ecl_null_terminated_base_string(argv); if (!Null(environ)) { env_buffer = from_list_to_execve_argument(environ, NULL); @@ -637,7 +632,6 @@ si_run_program_internal(cl_object command, cl_object argv, { int child_stdin, child_stdout, child_stderr; int pipe_fd[2]; - argv = CONS(command, ecl_nconc(argv, ecl_list1(ECL_NIL))); argv = _ecl_funcall3(@'coerce', argv, @'vector'); create_descriptor(input, @':input', &child_stdin, &parent_write); diff --git a/src/lsp/process.lsp b/src/lsp/process.lsp index 1d1f02bf6..76f8229af 100644 --- a/src/lsp/process.lsp +++ b/src/lsp/process.lsp @@ -105,7 +105,7 @@ :if-exists if-error-exists))) (let ((args (prepare-args (cons command argv)))) - (si:run-program-internal (car args) (cdr args) + (si:run-program-internal (si:copy-to-simple-base-string command) args input output error wait environ external-format))))