[vlc-devel] [PATCH] src/network: try to write data again if EAGAIN is returned

David Fuhrmann david.fuhrmann at gmail.com
Fri Dec 13 15:26:16 CET 2013


Am 13.12.2013 um 14:03 schrieb Denis Charmet <typx at dinauz.org>:

> Hi,
> 
> Le vendredi 13 décembre 2013 à 12:29:37, david.fuhrmann at gmail.com a écrit :
>> -            if (errno == EINTR)
>> +            if (errno == EINTR || errno == EAGAIN)
>>                 continue;
>>             msg_Err (p_this, "Write error: %m");
>>             break;
> 
> Why would a write return EAGAIN if poll returned properly?

Hi,

AFAIK poll returns if some data can be sent. But what if you want to send more data than the write buffer has place for? Is it guaranteed that then write always returns the number of bytes written, but never EAGAIN?

Regards,
David


More information about the vlc-devel mailing list