[Top][All Lists]

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

Re: pipe buffering

From: Neil Jerram
Subject: Re: pipe buffering
Date: Sat, 25 Sep 2010 00:30:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Aidan Gauland <address@hidden> writes:

> Maybe it would be better to post my original program that would just
> hang.  I was only using expect to print debugging messages; my
> original program used expect-strings.
> --Aidan
> #! /usr/bin/guile -s
> !#
> (use-modules (ice-9 expect))
> (use-modules (ice-9 popen))
> (define ie-io (open-pipe* OPEN_BOTH
>                           "/usr/bin/telnet"
>                           "" "259"))
> (let ((expect-port ie-io))
>   (expect-strings
>    ("^User:" (begin (display "[snip]\n" ie-io) (display "gave user")))
>    ("^passwd:" (begin (display "[snip]\n" ie-io) (display "gave passwd")))))

Ah, thanks.

I'm afraid I think you're stuck.  The problem sounds like this one:
In which case, the only fix is to set up the "pipe" as a pseudo-terminal
instead, and I don't believe Guile can do that.

If you wanted to work on a patch, a possible starting point would be to
look at how Emacs implements

  (let ((process-connection-type t))
    (open-network-stream ...))


reply via email to

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