Safe passing of subprocess arguments - always.
This commit is contained in:
parent
ee8aa95e24
commit
7f7d1c43c8
3 changed files with 13 additions and 13 deletions
|
@ -58,8 +58,8 @@
|
|||
|
||||
;; Very simple shell command wrapper that returns lines produced by
|
||||
;; given command. Dangerous - performs no argument escaping!
|
||||
(define (get-process-output-lines cmd)
|
||||
(let-values (((stdout stdin pid stderr) (process* cmd)))
|
||||
(define (get-process-output-lines cmd . args)
|
||||
(let-values (((stdout stdin pid stderr) (process* cmd args)))
|
||||
(close-output-port stdin)
|
||||
(let ((result (read-lines stdout)))
|
||||
(let-values (((a b c) (process-wait pid)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue