[issue10345] fcntl.ioctl always fails claiming an invalid fd

2010-11-21 Thread Ned Deily
Ned Deily 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 bytearra

[issue10345] fcntl.ioctl always fails claiming an invalid fd

2010-11-21 Thread Ned Deily
Changes by Ned Deily : -- Removed message: http://bugs.python.org/msg121996 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue10345] fcntl.ioctl always fails claiming an invalid fd

2010-11-21 Thread Ned Deily
Ned Deily 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 bytesarr

[issue10345] fcntl.ioctl always fails claiming an invalid fd

2010-11-06 Thread Ben Gamari
Ben Gamari added the comment: The problem seems to have been that I tried passing mutate_flag. Things seem to work fine when the last parameter is omitted. -- ___ Python tracker __

[issue10345] fcntl.ioctl always fails claiming an invalid fd

2010-11-06 Thread Ben Gamari
Changes by Ben Gamari : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue10345] fcntl.ioctl always fails claiming an invalid fd

2010-11-06 Thread Ben Gamari
New submission from Ben Gamari : Even the simple example included below fails in the following manner, $ sudo python3.1 hi.py 3 Traceback (most recent call last): File "hi.py", line 13, in ioctl(a, EVIOCGID, buf, True) TypeError: ioctl requires a file or file descriptor, an integer and