This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kulikjak
Recipients kulikjak
Date 2019-04-12.08:56:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555059394.06.0.893471228224.issue36610@roundup.psfhosted.org>
In-reply-to
Content
Hi,

We have several tests failing on Solaris due to the slightly different behavior of os.sendfile function. Sendfile on Solaris can raise EINVAL if offset is equal or bigger than the size of the file (Python expects that it will return 0 bytes sent in that case).

I managed to patch `socked.py` with additional checks on two places (patch attached), Python 3.8 introduced sendfile in shutil.py module, where I don't have fsize variable so easily accessible and so I am unsure what to do with it. Also, I am not even sure if this is a correct way to handle this. Maybe this should be patched somewhere in the .c file? Or there might be other systems with the same behavior and all I need to do is adjust some define guards there...

EINVAL can also mean other things and so I guess I cannot just catch that errno and continue as with returned 0. 

Thanks
History
Date User Action Args
2019-04-12 08:56:34kulikjaksetrecipients: + kulikjak
2019-04-12 08:56:34kulikjaksetmessageid: <1555059394.06.0.893471228224.issue36610@roundup.psfhosted.org>
2019-04-12 08:56:34kulikjaklinkissue36610 messages
2019-04-12 08:56:33kulikjakcreate