[gambit-list] open-process on Windows

Aemon Cannon aemoncannon at gmail.com
Mon Jan 22 23:02:29 EST 2007


Hey there,

First off, thanks for the awesome scheme implementation,
I'm really digging it so far.

Here's my question:

On my Windows XP system, running gambit - 4.0 b20, I'm
having trouble with the following code:
**********************************************************
(let* ((p (open-process "C:/Program Files/GnuWin32/bin/cat.exe")))
       (display "1" p)
       (close-output-port p)
       (let ((bc (read-all p)))
     (pp bc)))

**********************************************************
I expect the output to always be:
(1)
but about 1/3 of the time I get:
()

I can't figure why this code would be inconsistent. The 'cat' implementation
is (I think) a direct port of GNU cat. In any case I've had the same problem
with other binaries that read from STDIN and write to STDOUT.

I've tried inserting calls to (newline), (force-output), using (write) or
(write-char) instead of (display), all to no avail.

Any ideas?

Thanks,
Aemon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20070122/484380e5/attachment.htm>


More information about the Gambit-list mailing list