Re: [PATCH] do_execute() flush stdout before executing a command



Hello,

Just to let you know that this patch requires tremendous efforts to review
so take you time.

On Sat, 27 Aug 2005, Pavel Tsekov wrote:

> Hello,
>
> A very small and simple patch. It fixes the following problem with MC
> linked agains ncurses:
>
> 1) mc -u (or just mc if your MC is compiled without subshell support)
>
> 2) type `ls' (without quotes)
>
> 3) Ctrl + O
>
> As a result you'll see the actual command (ls) printed after its output.
>
> The reason for this is that ncurses sets stdout to be block buffered and
> not line buffered. Here is a quote from the ncurses/tinfo/setbuf.c from
> the ncurses package:
>
> [...]
> If the output file descriptor is connected to a tty (the typical case)
> it will probably be line-buffered.  Keith Bostic pointed out that we
> don't wantthis; it hoses people running over networks by forcing out
> a bunch of smallpackets instead of one big one, so screen updates on
> ptys look jerky. Restore block buffering to prevent this minor lossage.
> [...]
>
> Changelog:
>
> 2005-08-27  Pavel Tsekov  <ptsekov gmx net>
>
> 	* execute.c (do_execute): Flush stdout after printing the command
> 	to be executed.



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