Quit on thread creation failure
authorJens Axboe <jens.axboe@oracle.com>
Mon, 12 Mar 2007 10:03:04 +0000 (11:03 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 12 Mar 2007 10:03:04 +0000 (11:03 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c

diff --git a/fio.c b/fio.c
index 509f8be..b0afdcc 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -1029,6 +1029,7 @@ static void run_threads(void)
                                if (pthread_create(&td->thread, NULL, thread_main, td)) {
                                        perror("thread_create");
                                        nr_started--;
+                                       break;
                                }
                        } else {
                                if (!fork()) {