Thread waitpid() error check
authorJens Axboe <jens.axboe@oracle.com>
Thu, 22 Feb 2007 11:11:26 +0000 (12:11 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 22 Feb 2007 11:11:26 +0000 (12:11 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c

diff --git a/fio.c b/fio.c
index 0f72fd92c15c883e75603a19b2a4fc89e915ba6f..a394ff8c0d3045ad33e3fdc24f7e022a3e13bed0 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -844,7 +844,7 @@ static void reap_threads(int *nr_running, int *t_rate, int *m_rate)
                 * check if someone quit or got killed in an unusual way
                 */
                ret = waitpid(td->pid, &status, flags);
-               if (ret < 0) {
+               if (ret < 0 && !td->use_thread) {
                        if (errno == ECHILD) {
                                log_err("fio: pid=%d disappeared %d\n", td->pid, td->runstate);
                                td_set_runstate(td, TD_REAPED);