commit | 337d75a81c40aef6d693fc0d18e78b0c2444a1be | [log] [tgz] |
---|---|---|
author | Jens Axboe <axboe@kernel.dk> | Sat Oct 01 12:36:32 2011 -0600 |
committer | Jens Axboe <axboe@kernel.dk> | Sat Oct 01 12:36:32 2011 -0600 |
tree | 4c5dd5e8e0e3010eeb30c55c180dcfda3ae9cdac | |
parent | a37f69b72a74cbde6151458b890aab8d093f0c9f [diff] [blame] |
server: exit gracefully on ctrl-c Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/server.c b/server.c index 38698bc..ca37e3f 100644 --- a/server.c +++ b/server.c
@@ -409,7 +409,10 @@ int fio_server_text_output(const char *buf, unsigned int len) { - return fio_net_send_cmd(server_fd, FIO_NET_CMD_TEXT, buf, len); + if (server_fd != -1) + return fio_net_send_cmd(server_fd, FIO_NET_CMD_TEXT, buf, len); + + return 0; } int fio_server_log(const char *format, ...)