Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fileno support #80

Closed
mockodin opened this issue Sep 27, 2022 · 2 comments
Closed

fileno support #80

mockodin opened this issue Sep 27, 2022 · 2 comments

Comments

@mockodin
Copy link

fcntl supports passing the fileno directly, this seems like it should be supportable here as well

fh = open(filename, "w")
fcntl.flock(fh.fileno(), fcntl.LOCK_EX)
wolph added a commit that referenced this issue Oct 18, 2022
@wolph wolph closed this as completed in 568d213 Oct 18, 2022
@wolph
Copy link
Owner

wolph commented Oct 18, 2022

I can add partial support. On posix systems this is indeed possible, on windows systems it is not :)

wolph added a commit that referenced this issue Oct 18, 2022
Added fileno() support. Fixes #80 on posix systems v2.6.0

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEFJMl/RWQTpxOuJ6V6BRE6c4faV0FAmNOw+wACgkQ6BRE6c4f
# aV12fQ//cpXYz4xk8Tu14VJJBONFINQ0zkyy0v46jD06NovnMIjqzkLWPl4XiOXA
# mDsiq+SgWkcvID2BRe/EGyp/SP/XI9pJIW/0IQsfPfugdA+PvIDnG8554/uBqFl1
# H7qzJHHtDkChy3s5tgownmOlJ9EPvKnBzOVmxvYvNwIu5SzP9h9HdEHtEHk1UoGJ
# bLxu0LbLhigZFjBqT7nVLq1P9UFUu7O04czDNDRqzL07NI3bp7xsM2czRJq1x5Mk
# HC/5HccfwjdEGpAuumTry5MMcp3DLF8aeU6pAVRitz+yJD+SYA4LdwtwwAYUkgIy
# 95pdQsMaid+XBELJsLB2RlDDkAQJHGvA5jTzCOEvoo3WI0g99qDjfSw3ItOlvyuE
# s6RRbSSpp2OA5OmEwLj6EDJpmIoKUcdKEOZkvIUBwE7Ig4zb8eMqFRzY22ui/DhC
# WOSaI5RnAFRZanySLI3MMy8PFI8jmrhQo3qjJvx5OJtfNqKXiZPQvUkvh6p1SN8B
# 7pMC5tlIJSBaU1QzGE5KjrgxAahcUn7CDmkNVYjs+dGdsIbIGGKkOjdjtunWfbpg
# MrB17GETLPZOgvt3/496nE4ZKpoSXDt6e/4GG3f+H198RwbeIoEovrhrhTKpvJgt
# A3pFnhUOG5J17DijXjxPWYyWxzAOrgBRWMuwlGCkK3hNvLS1kxs=
# =z+ib
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Oct 18 17:19:08 2022 CEST
# gpg:                using RSA key 149325FD15904E9C4EB89E95E81444E9CE1F695D
# gpg: Good signature from "Rick van Hattem <wolph@wol.ph>" [ultimate]
# gpg:                 aka "[jpeg image of size 9662]" [ultimate]
@wolph
Copy link
Owner

wolph commented Oct 18, 2022

Release 2.6.0 supports fh.fileno() as well on posix (i.e. linux/unix/osx) systems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants