[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] HOWTO redirect a i/o-port in Unix??



Quoting Eli Barzilay:
> So, I tried every possible combination I can think about - and I can't
> see any way of doing this - just a piece of code that will write stuff
> that will go through gzip and mmencode into a file using two process
> things inside Scheme...

Ok - I *finally* understand.

Works:

 > (define p (process "cat"))
 > (display "hello" (cadr p))
 > (close-output-port (cadr p))
 > (read-string 100 (car p))
 "hello"
 > 

Doesn't work:

 > (define p (process "cat"))
 > (define p2 (process "cat")) ; run again - this is the only difference
 > (display "hello" (cadr p))
 > (close-output-port (cadr p))
 > (read-string 100 (car p))
 [stuck]

That seems very strange, and not right. I'm looking into it.

Matthew