From c1302d44dd1720bebe5308f976b59d879d994fd3 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 5 Mar 2007 20:18:31 +0100 Subject: [PATCH] Don't kill() running threads Just let them exit nicely. Signed-off-by: Jens Axboe --- fio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fio.c b/fio.c index 45ed354b..f183eeb5 100644 --- a/fio.c +++ b/fio.c @@ -67,7 +67,11 @@ static void terminate_threads(int group_id) for_each_td(td, i) { if (group_id == TERMINATE_ALL || groupid == td->groupid) { - kill(td->pid, SIGQUIT); + /* + * if the thread is running, just let it exit + */ + if (td->runstate < TD_RUNNING) + kill(td->pid, SIGQUIT); td->terminate = 1; td->start_delay = 0; } -- 2.25.1