Move get-process-output-lines to util-io.
This commit is contained in:
parent
4ac7fdbc6d
commit
64cd360c0d
5 changed files with 29 additions and 19 deletions
|
@ -29,7 +29,6 @@
|
|||
utils
|
||||
(
|
||||
filter
|
||||
get-process-output-lines
|
||||
utils-tests!
|
||||
)
|
||||
|
||||
|
@ -51,15 +50,6 @@
|
|||
(loop (cdr lst)
|
||||
res)))))
|
||||
|
||||
;; 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)))
|
||||
(close-output-port stdin)
|
||||
(let ((result (read-lines stdout)))
|
||||
(let-values (((a b c) (process-wait pid)))
|
||||
result))))
|
||||
|
||||
;; Performs utils module self-tests.
|
||||
(define (utils-tests!)
|
||||
(run-tests
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue