chiark / gitweb /
proxy/tripe-mitm.c: Report errors from select(2).
[tripe] / proxy / tripe-mitm.c
index ee7036c244b8ea01cf2df54a2c4215c879ad95c6..74739539d36f761213ed8d850b9583a68c853c6c 100644 (file)
@@ -721,8 +721,10 @@ int main(int argc, char *argv[])
     parse(argv[i]);
   if (npeer != 2)
     die(1, "need two peers");
-  for (;;)
-    sel_select(&sel);
+  for (;;) {
+    if (sel_select(&sel) && errno != EINTR)
+      die(1, "select failed: %s", strerror(errno));
+  }
 
 #undef f_bogus
 }