help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: asynchronous process management on WinWP; buffering problem?


From: kgold
Subject: Re: asynchronous process management on WinWP; buffering problem?
Date: Fri, 14 Apr 2006 13:43:55 -0400
User-agent: Mozilla/5.0 (X11; U; AIX 000C89FF4C00; en-US; rv:1.7) Gecko/20040617

The output buffering is a common problem. For C and perhaps other languages, stdout is normally line buffered. But when you pipe the output (like through emacs) it becomes fully buffered. So you don't see the output until the buffer is full.

I don't know if there's a general solution. If it's C and you have the source, this will fix it.

        setvbuf(stdout, _IONBF, 0);

Peter Tury wrote:
I try to control program xxx on MS WinXP from EmacsW32 (cvs). xxx runs in
DOS window normally and after a command it reads from stdin (until
newline), handles the input and, after another command, writes result to
stdout.

However it seems that some buffering (in Emacs? in MS Windows'
stdin/stdout?) tries to kill me: I can't see the results (from stdout) in
the associated buffer, only if it is long enough. At least it seems so: if
I send many "\n"-s (to "generate" a lot of prompts (to fill up the
buffer?)) then I get everything together after a while (of course, if I run
the program normally (=in a DOS window) everything works fine)... I hope I
could handle this through filter functions, but...



reply via email to

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