chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] posix:process hangup when reading process output (wi


From: felix winkelmann
Subject: Re: [Chicken-users] posix:process hangup when reading process output (win)
Date: Wed, 25 Oct 2006 14:16:45 +0200

On 10/25/06, $) <address@hidden> wrote:
Hi!
I am working on windows system, Chicken v2, Build 41.
I try to start a process from scheme script and read what that process had
produced. My script hangs for unknown reasons. Here is a sample code:

(require-extension posix)
(define-values (p1 p2 pid) (process "ls"))
(define response (read-sring #f p1)) ; <--- hangs here
(process-wait pid)

If I try to read output line by line (i.e with (read-line p1)) everything
goes fine until the call to read-line following those call to read-line that
consumed the last line of output. It appears that input port summoned by
process function does not recognize EOF, am I right?

Things goes more weird when csi is running without a console window (I
believe CGI programs are started this way). In the later case process
function fails to apply IO redirection to the process started (a spawned
process owns a brand new console window and output is showing there).


Is this on native MSVC, cygwin or mingw32?


cheers,
felix
--
http://galinha.ucpel.tche.br:8081/blog/blog.ssp




reply via email to

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