diff options
| author | mischief <mischief@offblast.org> | 2014-11-05 17:24:55 -0800 |
|---|---|---|
| committer | mischief <mischief@offblast.org> | 2014-11-05 17:24:55 -0800 |
| commit | 9f75e55216a1674ba5b27c53dd8dc66e00828be8 (patch) | |
| tree | ccf81855b788cf0e99470007be75a8e014d8fdf1 | |
| parent | 0aea317dd20eddec4791b2294e36382933c61bc1 (diff) | |
| download | plan9front-9f75e55216a1674ba5b27c53dd8dc66e00828be8.tar.xz | |
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.
| -rw-r--r-- | sys/src/libc/9sys/dial.c | 2 |
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); } |
