From 151d2a88bb15a252453c41a080ddc3fcc7b4de49 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Fri, 5 Oct 2012 21:16:35 +0200 Subject: Improve test for <<-redirection by making it less dependent on random factors that determine process interleaving, ensuring it gets processed through the pipeline rather than on the same descriptor by mangling it through 'tr'. Fix <<-redirection by reopening output port on new descriptor and explicitly setting up the input port to the given fd in the parent process --- scsh-process.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scsh-process.scm') 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) -- cgit v1.2.3