>>>>> Lam Luu <[email protected]> writes:
> Hello everyone! I am trying to write a Scheme script to drive GNU/Go
> through its stdin/stdout. However, there seems to be no way to create
> a bi-directional pipe toward another process. On the other hand, when
> I try to call create-pipe, the returned descriptors seems to be
> unusable, since it is not a port (even file-write procedure to write
> to a low-level file descriptor refuses to work).
I guess, the resulting file descriptors could be ``wrapped''
into ports somehow, but note that you'll need two pipes (four
descriptors or ports) -- one to pass the data to the child
process, and the other to pass the data back from it.
BTW, just for a test, you could try to `open-input-file' on,
e. g., `/dev/fd/7', where 7 is the file descriptor returned for
the ``read'' end of the pipe.
> Is there any way to spawn another process, then catch both of its
> stdin and stdout?
--
FSF associate member #7257
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users