Thread waitpid() error check

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.c b/fio.c
index 0f72fd9..a394ff8 100644
--- a/fio.c
+++ b/fio.c
@@ -844,7 +844,7 @@
 		 * 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);