[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to flush output to process
From: |
Frank Fischer |
Subject: |
Re: How to flush output to process |
Date: |
Sun, 6 Nov 2011 12:38:20 +0100 |
Am Sun, 06 Nov 2011 06:07:17 -0500
schrieb Eli Zaretskii <eliz@gnu.org>:
> > From: Frank Fischer <frank-fischer@shadow-soft.de>
> > Date: Sun, 6 Nov 2011 09:53:39 +0000 (UTC)
> >
> > In something like C I would use fflush(...) to force the buffered
> > data to be sent to the process (and it works), but I have not been
> > able to find some comparable function for Emacs Lisp.
> >
> > Is there a way the flush the Emacs->process stream, i.e., force all
> > buffered data to be actually send to the process, from Emacs Lisp?
>
> I'm guessing that your analysis of the problem (and therefore the
> solution you are seeking) is incorrect. I think it's the sub-process
> who is buffering input until it sees a newline.
>
> To fix this, make sure your subprocess reads its stdin in raw mode,
> not in cooked mode.
Well, I cannot change the subprocess' code. But even if it is a problem
of the subprocess, why does it work if I communicate with the
subprocess from some other program, i.e., not starting the process from
Emacs but from some other programming language, AND call the flush
function of the corresponding stream?
Btw, I would be surprised if it is indeed a problem of the subprocess
as it is designed to be used in this way.
Frank
- How to flush output to process, Frank Fischer, 2011/11/06
- Re: How to flush output to process, Eli Zaretskii, 2011/11/06
- Re: How to flush output to process,
Frank Fischer <=
- Re: How to flush output to process, Thien-Thi Nguyen, 2011/11/06
- Re: How to flush output to process, Frank Fischer, 2011/11/06
- Re: How to flush output to process, Thien-Thi Nguyen, 2011/11/07
- Re: How to flush output to process, Frank Fischer, 2011/11/07
- Re: How to flush output to process, Thien-Thi Nguyen, 2011/11/07
- Re: How to flush output to process, Frank Fischer, 2011/11/09