[issue10882] Add os.sendfile()

Ross Lagerwall report at bugs.python.org
Mon Jan 10 21:27:49 CET 2011

New submission from Ross Lagerwall <rosslagerwall at gmail.com>:

Attached is a patch which implements os.sendfile for unix systems (linux, freebsd, apple, solaris, dragonfly).

It takes the iov initialization code and off_t parsing from i10812.

It encapsulates all the functionality from the various sendfiles which means a fair amount of #ifdefs but the basic case works for all of them.

Tested on Linux & FreeBSD - it should work on solaris but since it needs to link with the sendfile library and I have no idea how to link the posix module with the sendfile library only on Solaris, i couldn't test it. If someone could please contribute this...

I think it might be possible to get a Windows equivalent of this - i'll leave it for someone else to do ;-)

components: Extension Modules
files: sendfile.patch
keywords: patch
messages: 125924
nosy: giampaolo.rodola, loewis, pitrou, rosslagerwall
priority: normal
severity: normal
status: open
title: Add os.sendfile()
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file20338/sendfile.patch

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list