Index: src/trusted/service_runtime/nacl_syscall_common.c |
=================================================================== |
--- src/trusted/service_runtime/nacl_syscall_common.c (revision 3440) |
+++ src/trusted/service_runtime/nacl_syscall_common.c (working copy) |
@@ -1731,6 +1731,12 @@ |
*/ |
if (0 != (flags & NACL_DONT_WAIT) && NaClWouldBlock()) { |
retval = -NACL_ABI_EAGAIN; |
+ } else if (-NACL_ABI_EMSGSIZE == ssize_retval) { |
+ /* |
+ * Allow the caller to handle the case when imc_sendmsg fails because |
+ * the message is too large for the system to send in one piece. |
+ */ |
+ retval = -NACL_ABI_EMSGSIZE; |
} else { |
/* |
* TODO(bsy): the else case is some mysterious internal error. |