title: When will send() return less than the length argument?
body: <p>When using blocking sockets on Linux, is there any reason for <code>send()</code> to return less than what was requested, <strong>other</strong> than an interrupted, but partially successful <code>send()</code> syscall?</p>
  
  <p>I'm aware that this is possibly very implementation defined, and that it would probably be very dangerous to rely on that behavior even without any installed signal handlers (and thus reasons for interrupted syscalls). I'll probably loop around the send call until completion; however, if there were any official word on the matter, I would be able to avoid that.</p>
  
  <p><a href="https://stackoverflow.com/questions/2618736/why-is-it-assumed-that-send-may-return-with-less-than-requested-data-transmitted">Why is it assumed that send may return with less than requested data transmitted on a blocking socket?</a> was asking the same question, with inconclusive results: Interrupted syscalls are mentioned as an example for a short return count, but it's still unclear whether a full TCP send buffer would cause a partial send or the <code>send()</code> would just block until there is enough room in the buffer.</p>