Sync stream buffer after sort

This commit is contained in:
Rodrigo Arias 2021-12-15 16:50:01 +01:00
parent 86eabb2b9d
commit d6c558118d

4
sort.c
View File

@ -34,6 +34,7 @@
#include <linux/limits.h> #include <linux/limits.h>
#include <errno.h> #include <errno.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/mman.h>
#include <stdatomic.h> #include <stdatomic.h>
#include <dirent.h> #include <dirent.h>
#include <unistd.h> #include <unistd.h>
@ -378,6 +379,9 @@ process_trace(struct ovni_trace *trace)
* attempt */ * attempt */
return -1; return -1;
} }
if(msync(stream->buf, stream->size, MS_ASYNC))
die("msync failed: %s\n", strerror(errno));
} }
else else
{ {