Use poll() for connect loop

So we can exit nicely when asked to.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/fio.c b/fio.c
index 5e4d0e6..a15080b 100644
--- a/fio.c
+++ b/fio.c
@@ -46,6 +46,7 @@
 #include "profile.h"
 #include "lib/rand.h"
 #include "memalign.h"
+#include "server.h"
 
 unsigned long page_mask;
 unsigned long page_size;
@@ -122,6 +123,7 @@
 {
 	if (threads) {
 		log_info("\nfio: terminating on signal %d\n", sig);
+		exit_backend = 1;
 		fflush(stdout);
 		exit_value = 128;
 		terminate_threads(TERMINATE_ALL);