diff options
Diffstat (limited to 'src/nvim/event/process.c')
-rw-r--r-- | src/nvim/event/process.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/event/process.c b/src/nvim/event/process.c index 7a8a39dbcf..7059a41def 100644 --- a/src/nvim/event/process.c +++ b/src/nvim/event/process.c @@ -22,6 +22,11 @@ # include "event/process.c.generated.h" #endif +/// Externally defined with gcov. +#ifdef USE_GCOV +void __gcov_dump(void); +#endif + // Time for a process to exit cleanly before we send KILL. // For PTY processes SIGTERM is sent first (in case SIGHUP was not enough). #define KILL_TIMEOUT_MS 2000 @@ -50,6 +55,11 @@ int process_spawn(Process *proc, bool in, bool out, bool err) proc->err.closed = true; } +#ifdef USE_GCOV + // Dump coverage data before forking, to avoid "Merge mismatch" errors. + __gcov_dump(); +#endif + int status; switch (proc->type) { case kProcessTypeUv: |