for_each_td(td, i) {
if (group_id == TERMINATE_ALL || groupid == td->groupid) {
- /*
- * if the thread is running, just let it exit
- */
- if (td->runstate < TD_RUNNING)
+ if (td->runstate <= TD_RUNNING)
kill(td->pid, SIGQUIT);
td->terminate = 1;
td->o.start_delay = 0;