Added open streams flushing before the test worker exits

This commit is contained in:
Snaipe 2015-03-22 20:19:16 +01:00
parent 6adaa8706f
commit a09b65cc5f

View file

@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/wait.h>
#include <csptr/smart_ptr.h>
@ -71,6 +72,8 @@ struct process *spawn_test_worker(struct criterion_test *test,
func(test, suite);
close(fds[1]);
fflush(NULL); // flush all opened streams
if (criterion_options.no_early_exit)
return NULL;
else