ks_sleep_ms(ms);
}
- } while (--sanity > 0 && ((r == -1 && ks_errno_is_blocking(ks_errno())) || (kws->block && wrote < bytes)));
+ if (r == -1) {
+ if (!ks_errno_is_blocking(ks_errno())) {
+ break;
+ }
+ }
+
+ } while (--sanity > 0 && kws->block && wrote < bytes);
//if (r<0) {
//printf("wRITE FAIL: %s\n", strerror(errno));
-Thu Apr 6 17:08:51 CDT 2017
+Fri Apr 21 15:42:59 CDT 2017
ms_sleep(ms);
}
- } while (--sanity > 0 && ((r == -1 && xp_is_blocking(xp_errno())) || (wsh->block && wrote < bytes)));
+ if (r == -1) {
+ if (!ks_errno_is_blocking(ks_errno())) {
+ break;
+ }
+ }
+
+ } while (--sanity > 0 && kws->block && wrote < bytes);
//if (r<0) {
//printf("wRITE FAIL: %s\n", strerror(errno));
ms_sleep(ms);
}
- } while (--sanity > 0 && ((r == -1 && xp_is_blocking(xp_errno())) || (wsh->block && wrote < bytes)));
+ if (r == -1) {
+ if (!ks_errno_is_blocking(ks_errno())) {
+ break;
+ }
+ }
+
+ } while (--sanity > 0 && kws->block && wrote < bytes);
//if (r<0) {
//printf("wRITE FAIL: %s\n", strerror(errno));