diff options
author | Daniel Hahler <git@thequod.de> | 2019-06-18 06:31:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-18 06:31:57 +0200 |
commit | 25e04c1d981e737b9f6e30d3b7a62954d81101ab (patch) | |
tree | ed9bd68d2bcab0aae1b59853ee09ffe62e9f3452 /src/nvim/os/pty_process_unix.c | |
parent | 4946751906370134cd02e8da0736bef221171172 (diff) | |
download | rneovim-25e04c1d981e737b9f6e30d3b7a62954d81101ab.tar.gz rneovim-25e04c1d981e737b9f6e30d3b7a62954d81101ab.tar.bz2 rneovim-25e04c1d981e737b9f6e30d3b7a62954d81101ab.zip |
gcov: use __gcov_flush instead of __gcov_dump (#10260)
This restores missing coverage again.
Move it to process_spawn in os/pty_process_unix.c, since it seems to
break printargs-test on Windows/AppVeyor otherwise (#10248).
Diffstat (limited to 'src/nvim/os/pty_process_unix.c')
-rw-r--r-- | src/nvim/os/pty_process_unix.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c index 5fdf0e6181..97545a6cb1 100644 --- a/src/nvim/os/pty_process_unix.c +++ b/src/nvim/os/pty_process_unix.c @@ -36,6 +36,11 @@ # include "os/pty_process_unix.c.generated.h" #endif +/// Externally defined with gcov. +#ifdef USE_GCOV +void __gcov_flush(void); +#endif + /// termios saved at startup (for TUI) or initialized by pty_process_spawn(). static struct termios termios_default; @@ -59,6 +64,11 @@ int pty_process_spawn(PtyProcess *ptyproc) init_termios(&termios_default); } +#ifdef USE_GCOV + // Flush coverage data before forking, to avoid "Merge mismatch" errors. + __gcov_flush(); +#endif + int status = 0; // zero or negative error code (libuv convention) Process *proc = (Process *)ptyproc; assert(proc->err.closed); |