git: 9front

Download patch

ref: b3043af72d44b38a610623f5dedfeb99aa405408
parent: e3930c1d03ed8f9df7e2c80074d904ea4cbe21f6
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);
 	}
--