Fix propagation of error value on failure to connect to fio server
authorJens Axboe <axboe@fb.com>
Wed, 2 Apr 2014 14:28:49 +0000 (08:28 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 2 Apr 2014 14:28:49 +0000 (08:28 -0600)
Fio does detect the error and exits, but it doesn't exit with
a non-zero exit value.

Signed-off-by: Jens Axboe <axboe@fb.com>
init.c

diff --git a/init.c b/init.c
index c3996a7..e944856 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1963,11 +1963,8 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
        if (do_exit && !(is_backend || nr_clients))
                exit(exit_val);
 
-       if (nr_clients && fio_clients_connect()) {
-               do_exit++;
-               exit_val = 1;
-               return -1;
-       }
+       if (nr_clients && fio_clients_connect())
+               exit(1);
 
        if (is_backend && backend)
                return fio_start_server(pid_file);