From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: help-gnu-emacs@gnu.org
Subject: Re: asynchronous process management on WinWP; buffering problem?
Date: Fri, 14 Apr 2006 21:11:39 +0200 [thread overview]
Message-ID: <443FF3EB.7020208@student.lu.se> (raw)
In-Reply-To: <443fdf5c$1@kcnews01>
I do not understand this so I have some (perhaps stupid) questions:
- What determines how the buffering works?
- Can a program like Emacs change this behaviour?
- When does the buffering works differently? In a "console"? Is cmd.exe
a "console"? But is it not just another program?
kgold wrote:
> 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...
next prev parent reply other threads:[~2006-04-14 19:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-14 7:14 asynchronous process management on WinWP; buffering problem? Peter Tury
2006-04-14 17:43 ` kgold
2006-04-14 19:11 ` Lennart Borgman [this message]
[not found] ` <mailman.414.1145041920.9609.help-gnu-emacs@gnu.org>
2006-04-14 20:13 ` Miles Bader
2006-04-15 7:12 ` Lennart Borgman
[not found] ` <mailman.434.1145085136.9609.help-gnu-emacs@gnu.org>
2006-04-15 9:17 ` Jason Rumney
2006-04-15 15:26 ` Lennart Borgman
2006-04-15 17:54 ` Benjamin Riefenstahl
2006-04-15 23:50 ` Lennart Borgman
2006-04-17 13:08 ` Benjamin Riefenstahl
2006-04-17 16:02 ` Lennart Borgman
[not found] ` <mailman.460.1145145017.9609.help-gnu-emacs@gnu.org>
2006-04-16 0:21 ` Miles Bader
2006-04-16 7:15 ` Eli Zaretskii
[not found] ` <mailman.437.1145114823.9609.help-gnu-emacs@gnu.org>
2006-04-15 23:30 ` Miles Bader
2006-04-14 20:42 ` Jason Rumney
2006-04-15 20:56 ` Peter Tury
2006-04-19 15:05 ` Peter Tury
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=443FF3EB.7020208@student.lu.se \
--to=lennart.borgman.073@student.lu.se \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).