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 0f72fd9..a394ff8 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);