reap_threads does not account for jobs that have been delayed
(e.g. via startdelay) which may lead to all threads being
terminated. The following job file demonstrates the problem:
[job1]
filename=job1file
size=16k
startdelay=1
Signed-off-by: Aaron Carroll <aaronc@gelato.unsw.edu.au>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
- if (!td->pid || td->runstate == TD_REAPED)
+ if (!td->pid) {
+ pending++;
+ continue;
+ }
+ if (td->runstate == TD_REAPED)
continue;
if (td->o.use_thread) {
if (td->runstate == TD_EXITED) {
continue;
if (td->o.use_thread) {
if (td->runstate == TD_EXITED) {