diff options
-rw-r--r-- | scsh-process.scm | 2 | ||||
-rw-r--r-- | tests/run.scm | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/scsh-process.scm b/scsh-process.scm index e60fb67..1fa12d9 100644 --- a/scsh-process.scm +++ b/scsh-process.scm @@ -322,7 +322,7 @@ (duplicate-fileno (file-open (maybe->string `?file-name) open/rdonly) `?fd)) ((_ (<< ?fd ?object)) - (fork/pipe (lambda () (display `?object)))) + (fork/pipe+ `((1 ?fd)) (lambda () (display `?object (open-output-file* 1))))) ((_ (= ?fd-from ?fd/port-to)) (let* ((fd/port-to ?fd/port-to) ; Evaluate once (fd-to (if (port? fd/port-to) diff --git a/tests/run.scm b/tests/run.scm index 2ad287f..c4deb88 100644 --- a/tests/run.scm +++ b/tests/run.scm @@ -1,7 +1,7 @@ (include "../scsh-process.scm") (import scsh-process) -(use test posix) +(use test posix srfi-13) (test-begin "scsh-process") @@ -53,8 +53,9 @@ (let ((message "testing, 1 2 3")) (test "Redirecting from object" - `("blah" "foo" ,message) - (run/strings (cat ,tmpfile -) (<< ,message)))) + `("blah" "foo" ,(string-delete #\t message)) + (run/strings (pipe (epf (tr -d t) (<< ,message)) + (cat ,tmpfile -))))) (delete-file* tmpfile))) (test-group "Subprocesses" |