Aidan Gauland <[email protected]> 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" > "ienabler.canterbury.ac.nz" "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: http://stackoverflow.com/questions/1000674/turn-off-buffering-in-pipe. 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 ...)) Regards, Neil
