On 25 November 2015, B. Wilson <[email protected]>
wrote:
> When running :make and there is output to both stderr and stdout, I'm
> seeing a degree of reordering in the displayed output.
>
> I didn't notice any similar issues when searching the mailing list,
> but forgive me if this is already a known bug/feature.
>
> Below I give steps on how to reproduce the behaviour on my machine as
> well as the output of `vim --version`. I will be happy to produce any
> other details that may be necessary.
> 
> 
> ## Reproducing the Behaviour
> 
> Create the following `foo.c` file:
> 
>               #include <stdio.h>
> 
>               int main()
>               {
>                       printf("This is a message on stdout and should appear 
> first\n");
>                       fprintf(stderr, "This is a message on stderr and should 
> appear second\n");
> 
>                       return 0;
>               }
> 
> Create the following `Makefile`:
> 
>               run: foo
>                       @./foo
> 
> Compile the program:
> 
>               $ make foo
> 
> Let make compile and run the program:
> 
>               $ make run
>               cc     foo.c   -o foo
>               This is a message on stdout and should appear first
>               This is a message on stderr and should appear second
> 
> Now compare this to when calling `:make run` from `vim`:
> 
>               :make run
>               This is a message on stderr and should appear second
>               This is a message on stdout and should appear first
> 
>               Press ENTER or type command to continue

    This has nothing to do with Vim.  Proof:

        $ make run | cat
        This is a message on stderr and should appear second
        This is a message on stdout and should appear first

    This has to do with stdio buffering, but a detailed explanation of
what's going on would involve a discussion of the interactions between
your terminal program, your shell, the line discipline in the kernel,
and the probgrams involved.  The bottom line is, you won't be able to
fix it.

    /lcd

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui