shithub: riscv

Download patch

ref: 9f75e55216a1674ba5b27c53dd8dc66e00828be8
parent: 0aea317dd20eddec4791b2294e36382933c61bc1
author: mischief <mischief@offblast.org>
date: Wed Nov 5 12:24:55 EST 2014

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.

--- a/sys/src/libc/9sys/dial.c
+++ b/sys/src/libc/9sys/dial.c
@@ -114,6 +114,8 @@
 			break;
 		*err = 0;
 		errstr(err, sizeof err);
+		if(strcmp(err, "interrupted") == 0)
+			break;
 		if(strstr(err, "does not exist") == 0)
 			strcpy(besterr, err);
 	}