[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v7 01/14] libxl: Enhance libxl__sendmsg_fds to deal with EINTR and EWOULDBLOCK



Anthony PERARD writes ("[PATCH v7 01/14] libxl: Enhance libxl__sendmsg_fds to 
deal with EINTR and EWOULDBLOCK"):
> This patch change the behavior of libxl__sendmsg_fds to retry sendmsg on
> EINTR error.
> 
> This patch also allow a caller of libxl__sendmsg_fds to deal with
> EWOULDBLOCK. The function now requires to send only 1 byte of data so
> that when dealing with non-blocking fds a EWOULDBLOCK error would mean
> that the fds haven't been sent yet. Current caller already send only 1
> byte.

Even with a blocking fd, sendmsg may in principle report a short
write.  (So the commit message should talk about short writes in
general.)

> Notes:
>     v7:
>         always assert datalen == 1, but only fail when sendmsg haven't send
>         everything (r != datalen)
>         check sendmsg return value on success as well (check for short write)

Rather than having a function which takes an argument which
mandatorily takes the value 1, how about simply deleting that
argument ?

You can do that in a followup patch if you like.  In the meantime:

Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.