summaryrefslogtreecommitdiff
path: root/sys/src/libc
diff options
context:
space:
mode:
authormischief <mischief@offblast.org>2014-11-05 17:24:55 -0800
committermischief <mischief@offblast.org>2014-11-05 17:24:55 -0800
commit9f75e55216a1674ba5b27c53dd8dc66e00828be8 (patch)
treeccf81855b788cf0e99470007be75a8e014d8fdf1 /sys/src/libc
parent0aea317dd20eddec4791b2294e36382933c61bc1 (diff)
libc: allow dial to be interrupted
previously, if dial was interrupted by an alarm or other note while connecting to a host that resolved to multiple ips, dial would ignore the interruption and try the next host. now dial properly returns with error when it is interrupted.
Diffstat (limited to 'sys/src/libc')
-rw-r--r--sys/src/libc/9sys/dial.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/libc/9sys/dial.c b/sys/src/libc/9sys/dial.c
index 4ac54d46c..2a378f219 100644
--- a/sys/src/libc/9sys/dial.c
+++ b/sys/src/libc/9sys/dial.c
@@ -114,6 +114,8 @@ csdial(DS *ds)
break;
*err = 0;
errstr(err, sizeof err);
+ if(strcmp(err, "interrupted") == 0)
+ break;
if(strstr(err, "does not exist") == 0)
strcpy(besterr, err);
}