diff options
-rw-r--r-- | tissue/utils.scm | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/tissue/utils.scm b/tissue/utils.scm index 156d333..4f865be 100644 --- a/tissue/utils.scm +++ b/tissue/utils.scm @@ -21,7 +21,6 @@ #:use-module (srfi srfi-26) #:use-module (ice-9 popen) #:export (call-with-current-directory - call-with-input-pipe get-line-dos-or-unix memoize-thunk)) @@ -33,19 +32,6 @@ directory after THUNK returns." thunk (cut chdir original-current-directory)))) -(define (call-with-input-pipe proc program . args) - "Execute PROGRAM ARGS ... in a subprocess with a pipe to it. Call -PROC with an input port to that pipe. Close the pipe once PROC exits, -even if it exits non-locally. Return the value returned by PROC." - (let ((port #f)) - (dynamic-wind (lambda () (set! port (apply open-pipe* OPEN_READ program args))) - (cut proc port) - (lambda () - (let ((return-value (status:exit-val (close-pipe port)))) - (unless (and return-value - (zero? return-value)) - (error "Invocation of program failed" (cons program args)))))))) - (define (get-line-dos-or-unix port) "Read line from PORT. This differs from `get-line' in (rnrs io ports) in that it also supports DOS line endings." |