[plt-scheme] Process hangs with big input

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Tue Mar 14 09:23:54 EST 2006

Hi all,

I'm trying to control an external process (svn) using the
process function in (lib "process.ss")  I want to capture
the output so I've wrapped process in this fucntion from
the Scheme Cookbook:

  (define (system/output command-string)
    (let-values (((out in id err ctrl)
                  (apply values (process command-string))))
      (ctrl 'wait)  ;; wait for the process to finish
          (case (ctrl 'status)
             (port->string out))
            (else #f))
        (close-output-port in)
        (close-input-port out)
        (close-input-port err))))

When the process creates a small amount of output
system/output terminates.  When the process creates a large
amount of output it never terminates.  Debugging by hand I
always get:

> (ctrl 'status)

Could there be a buffer that fills up, preventing the
process from writing my output and terminating.  Looking
through process.ss has not shed much light.


Email: noelwelsh <at> yahoo <dot> com   noel <at> untyped <dot> com
AIM: noelhwelsh
Blogs: http://monospaced.blogspot.com/  http://www.untyped.com/untyping/

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Posted on the users mailing list.