summarylogtreecommitdiffstats
path: root/allow-zero-timeout.patch
blob: f75d991667322f6170b6f53ac86a99644e8d1b7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff -urN a/src/io.c b/src/io.c
--- a/src/io.c	2011-04-05 12:58:58.000000000 -0600
+++ b/src/io.c	2014-07-07 05:44:18.668161665 -0600
@@ -43,6 +43,7 @@
 #include <string.h>
 #include <fcntl.h>
 #include <errno.h>
+#include <limits.h>
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -75,11 +76,10 @@
     const char *user_timeout = getenv("DISTCC_IO_TIMEOUT");
     if (user_timeout) {
         int parsed_user_timeout = atoi(user_timeout);
-        if (parsed_user_timeout <= 0) {
-          rs_log_error("Bad DISTCC_IO_TIMEOUT value: %s", user_timeout);
-          exit(EXIT_BAD_ARGUMENTS);
-        }
-        current_timeout = parsed_user_timeout;
+        if (parsed_user_timeout <= 0)
+            current_timeout = INT_MAX;
+        else
+            current_timeout = parsed_user_timeout;
     } else {
         current_timeout = default_dcc_io_timeout;
     }