chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Re: Question about pipe


From: Ivan Shmakov
Subject: [Chicken-users] Re: Question about pipe
Date: Thu, 12 Mar 2009 00:48:39 +0600
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

>>>>> Lam Luu <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]