* gnutls.c (emacs_gnutls_write): Set errno appropriately for
send_process.
+2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
+
+ * gnutls.c (emacs_gnutls_write): Set errno appropriately for
+ send_process.
+
2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
* keymap.c (Fsingle_key_description): Handle char ranges.
{
if (rtnval == GNUTLS_E_INTERRUPTED)
continue;
- else
+ else {
+ /* If we get EAGAIN, then set errno appropriately so that
+ send_process retries the correct way instead of
+ erroring out. */
+ if (rtnval == EAGAIN) {
+#ifdef EWOULDBLOCK
+ errno = EWOULDBLOCK;
+#endif
+#ifdef EAGAIN
+ errno = EAGAIN;
+#endif
+ }
break;
+ }
}
buf += rtnval;