Christopher Allan Webber <cweb...@dustycloud.org> writes: > Last night I was trying to do the equivalent of this: > > bash$ echo "foo" | sha512sum > > in guile. But I was unable to find a clear way to do it. > > I tried something like: > > (let* ((port (open-pipe* > OPEN_BOTH > "sha256sum" "--binary"))) > (display "test me\n" port) > (force-output port) > (let ((result (drain-input port))) > (close-port port) > (car (string-split result #\space)))) > > Unfortunately, this just hangs forever at the drain-input. I get the > same issue if I do (read-line port). > > What I expected was that Guile would provide a way to access stdin, > stdout, stderr in a process as separate ports.
Indeed, this is exactly what we need. It's been on my TODO list for a while. Mark