New submission from Giampaolo Rodola' <g.rod...@gmail.com>:
>From "man sendfile" on both OSX and FreeBSD: <<[EINTR] A signal interrupted sendfile() before it could be completed. If specified, the number of bytes successfully sent will be returned in *len.>> Right now we catch EINTR and simply retry. Instead we should only retry is no bytes were sent, else we should return those bytes, similarly to what we do on EAGAIN and EBUSY: https://github.com/python/cpython/blob/2438cdf0e932a341c7613bf4323d06b91ae9f1f1/Modules/posixmodule.c#L8907-L8917 ---------- components: Library (Lib) messages: 339214 nosy: giampaolo.rodola priority: normal severity: normal stage: needs patch status: open title: BSD/OSX: os.sendfile() does not return bytes sent on EINTR versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36488> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com