[issue16834] ioctl mutate_flag behavior in regard to the buffer size limit

2020-11-06 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16834] ioctl mutate_flag behavior in regard to the buffer size limit

2019-03-15 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16834] ioctl mutate_flag behavior in regard to the buffer size limit

2015-03-19 Thread Martin Panter

Martin Panter added the comment:

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 "", line 1, in 
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.

--
components: +Extension Modules
nosy: +vadmium
versions: +Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16834] ioctl mutate_flag behavior in regard to the buffer size limit

2014-07-15 Thread Mark Lawrence

Mark Lawrence added the comment:

@Yuval sorry about the delay in replying.  Can a *nix person comment on this 
please as I stick with Windows.

--
nosy: +BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16834] ioctl mutate_flag behavior in regard to the buffer size limit

2013-01-01 Thread Yuval Weinbaum

New submission from Yuval Weinbaum:

In fcntl module, the documentation states the following regarding the 
mutate_flag in ioctl method:

***
If it is false, the buffer’s mutability is ignored and behaviour is as for a 
read-only buffer, except that the 1024 byte limit mentioned above is avoided – 
so long as the buffer you pass is as least as long as what the operating system 
wants to put there, things should work.
***

However, looking at the code (fcntlmodule.c) it seems that the 1024 bytes 
limitation is avoided when the mutate_flag is set to True (the opposite of what 
is stated in the doc).

--
assignee: docs@python
components: Documentation
messages: 178732
nosy: Yuval.Weinbaum, docs@python
priority: normal
severity: normal
status: open
title: ioctl mutate_flag behavior in regard to the buffer size limit
versions: Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com