Steffen Daode Nurpmeso added the comment:
Before i'm going down, here is the paragraph from 'man 2 sendfile':
When a header or trailer is specified the value of len returned will
include the size of header or trailer sent. The user should provide suf-
ficiently large value of len as argum
Steffen Daode Nurpmeso added the comment:
Did you know that 'sbytes' is not adjusted to match possibly
existent headers and trailers in posixmodule.c?
This however is required according to Mac OS X 'man 2 sendfile'.
I'll attach a simple, naive patch for a very intelligent and
outstanding oper
Steffen Daode Nurpmeso added the comment:
posixmodule.c:
iov_setup():
IOV[i]: buffer:0x10152b8f0, len:512
iov_setup() leave ok
before sendfile: sf=0x7fff5fbfb410, sf.headers=0x10036c780
sf.headers[0].iov_base=0x10152d950, .iov_len=512
Steffen Daode Nurpmeso added the comment:
It's about the headers[]:
def test_headers(self):
total_sent = 0
sent = os.sendfile(self.sockno, self.fileno, 0, 4096,
headers=[b"x" * 512])
total_sent += sent
print("
New submission from Steffen Daode Nurpmeso :
Antoine, i made you noisy because you took care about Issue11323.
I'm at r88671 (271057c7c6f3).
I'm opening this because the buildbot URL (thanks) doesn't show
anything about sendfile(2).
12:47 ~/arena/code.extern.repos/py3k.hg $ ./python.exe -Wd -m t