Re: pipe buffering

2010-09-24 Thread Neil Jerram
Aidan Gauland 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 po

Re: pipe buffering

2010-09-23 Thread Aidan Gauland
On Wed, Sep 22, 2010 at 09:17:08PM +0100, Neil Jerram wrote: > Well, as the manual says: > > -- Macro: expect clause ... > [...] The procedures > are called in turn after each character is read from the port, > [...] > > The test is successful if the procedure returns a non

Re: pipe buffering

2010-09-23 Thread Aidan Gauland
Neil Jerram ossau.uklinux.net> writes: > Well, as the manual says: > > -- Macro: expect clause ... > [...] The procedures > are called in turn after each character is read from the port, > [...] > > The test is successful if the procedure returns a non-false value. > > Yo

Re: pipe buffering

2010-09-22 Thread Neil Jerram
Aidan Gauland writes: > Then I have a sexp for debugging, which shows that `expect' is getting > one character at a time from the telnet subprocess, since it only > prints out "Tmatch", instead of "Trying [IP address]..." Well, as the manual says: -- Macro: expect clause ... [...] The p

Re: pipe buffering

2010-09-21 Thread Aidan Gauland
Aidan Gauland no8wireless.co.nz> writes: > I'm trying to write a program using Guile's expect module to > automatically log into a telnet server, perform some action, and log > out. [snip] I forgot to mention that I'm using Guile 1.8.7. --Aidan

pipe buffering

2010-09-21 Thread Aidan Gauland
I'm trying to write a program using Guile's expect module to automatically log into a telnet server, perform some action, and log out. This is the start of my program... #! /usr/bin/guile -s !# (use-modules (ice-9 expect)) (use-modules (ice-9 popen)) (define ie-io (open-pipe* OPEN_BOTH