[issue10345] fcntl.ioctl always fails claiming an invalid fd
Ned Deily
report at bugs.python.org
Sun Nov 21 22:18:48 CET 2010
Ned Deily <nad at acm.org> added the comment:
If you call ioctl with the mutate_flag True, you need to pass "an object supporting the read-write buffer protocol" as the arg parameter for the results of ioctl to be returned in. In your example, you pass a bytes object which is immutable. Try using a bytesarray object instead, which is mutable, or, for instance, an array object as shown in the documentation.
http://docs.python.org/py3k/library/fcntl.html#fcntl.ioctl
http://docs.python.org/py3k/library/stdtypes.html#bytes-and-byte-array-methods
----------
nosy: +ned.deily
resolution: -> invalid
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10345>
_______________________________________
More information about the Python-bugs-list
mailing list