From 6ea8f70ca832785511fec8cc2098462591554389 Mon Sep 17 00:00:00 2001 From: Bowen Wang Date: Wed, 5 Jun 2024 10:24:15 +0800 Subject: [PATCH] osperf/osperf: move close pipefd after pthread_join Avoid the new thread write the closed pipe Signed-off-by: Bowen Wang --- benchmarks/osperf/osperf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/osperf/osperf.c b/benchmarks/osperf/osperf.c index e4b69827c..54a578f25 100644 --- a/benchmarks/osperf/osperf.c +++ b/benchmarks/osperf/osperf.c @@ -281,9 +281,9 @@ static size_t poll_performance(void) poll(&fds, 1, -1); performance_end(&result); + pthread_join(ret, NULL); close(pipefd[0]); close(pipefd[1]); - pthread_join(ret, NULL); return performance_gettime(&result); }