From: Jens Axboe Date: Mon, 5 Mar 2007 19:18:31 +0000 (+0100) Subject: Don't kill() running threads X-Git-Tag: fio-1.14~83 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=c1302d44dd1720bebe5308f976b59d879d994fd3 Don't kill() running threads Just let them exit nicely. Signed-off-by: Jens Axboe --- 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; }