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 martin.panter
Recipients BreamoreBoy, Yuval.Weinbaum, docs@python, martin.panter
Date 2015-03-19.23:10:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426806631.88.0.688747278907.issue16834@psf.upfronthosting.co.za>
In-reply-to
Content
Looking at the C code, if a writable buffer is passed, mutate_arg is false, and the buffer is longer than 1024 bytes, then a ValueError is raised:

>>> ioctl(0, 0, bytearray(2048), False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: ioctl string arg too long

So it seems the implementation does not match the documentation’s claim that “the 1024 byte limit . . . is avoided”. IMO this is an implementation bug.

But instead of (or in addition to) fixing it, maybe we could consider removing “mutate_flag” parameter altogether. It was originally added as a backwards compatibility helper for Issue 555817 in Python 2.3, and changed to True by default in Python 2.5.
History
Date User Action Args
2015-03-19 23:10:31martin.pantersetrecipients: + martin.panter, docs@python, BreamoreBoy, Yuval.Weinbaum
2015-03-19 23:10:31martin.pantersetmessageid: <1426806631.88.0.688747278907.issue16834@psf.upfronthosting.co.za>
2015-03-19 23:10:31martin.panterlinkissue16834 messages
2015-03-19 23:10:31martin.pantercreate