[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: buffering of process output
From: |
Kim F. Storm |
Subject: |
Re: buffering of process output |
Date: |
Sun, 10 Oct 2004 02:08:38 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
I have tried your example on gnu/linux, and I can confirm your
findings for CVS emacs under X. (I don't have 20.7)
But if I try your example with 'emacs -nw', then CVS emacs runs
smoothly too. Wierd!!!
It seems that the difference in buffering in X vs. -nw is in the call
to emacs_read, i.e. in the call to read. But 20.7 seems to do exactly
the same calls.
I have yet to find a sensible explanation why CVS emacs buffers output
differently with X.
So I wonder if X somehow causes read from a pipe to buffer things
differently [line buffering perhaps] (or the pipe to be setup
differently)?
I also tried to do (set-buffer-multibyte nil) before call-process:
- CVS emacs under X becomes much worse (seems to have to collect 16K
output before updating)
- CVS emacs -nw still runs smoothly.
So unibyte/multibyte also kicks in somehow...
Ideas anyone ??
Kazu Yamamoto (山本和彦) <address@hidden> writes:
> Emacs 21 has a different behavior of buffering of process output from
> Emacs 20.7.
>
> Evaluate the following in the *scratch* buffer
>
> (call-process "ping" nil t t "localhost")
>
> On Emacs 20.7, each line is smoothly inserted every second.
>
> On Emacs 21.3.50, however, insertion is awkward.
>
> --Kazu
>
> ----
> In GNU Emacs 21.3.50.1 (i386-unknown-netbsdelf1.6T, X toolkit, Xaw3d scroll
> bars)
> of 2003-07-16 on caster.iij.ad.jp
> configured using `configure '--without-xim' '--prefix=/usr/local/emacs21'
> 'CFLAGS=-I/usr/pkg/include' 'CPPFLAGS=-I/usr/pkg/include -L/usr/pkg/lib'
> 'LDFLAGS=-R/usr/pkg/lib -L/usr/pkg/lib -R/usr/X11R6/lib -L/usr/X11R6/lib''
>
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: buffering of process output,
Kim F. Storm <=