Bugs item #1262856, was opened at 2005-08-18 01:53
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1262856&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Raise L. Sail (fullsail)
Assigned to: Neal Norwitz (nnorwitz)
Summary: fcntl.ioctl have a bit problem.

Initial Comment:
First, I write python program on Linux.

The function ioctl of fcntl module, take a integer
parameter
as ioctl command. in python 2.3.x, if this command
value is more than 0x80000000, interpreter will popup
some warnning message. but in python 2.4.x, it raise a
exception directly.

My solution is writing one cutoms module in C. but this
is so ugly.

There are some ioctl command value are more than
0x80000000,  I think we should not reject "negative"
ioctl command.

enjoy.


----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2005-10-04 10:12

Message:
Logged In: YES 
user_id=33168

Ah, I see.  I was confused since both are in the fcntl
module.  I agree this bug isn't related to the patch.

This got me looking into fcntl.ioctl() and I wonder if
there's still not a problem.  In the patch, I had to make
arg a long which is consistent with fcntl() doc.  ioctl()
says the param is ..., so I don't know if it should be an
int or a long.  The current ioctl uses an int (lines 98 and
175).  ISTM that arg should probably be unsigned (like the
code variable) or a long here.  (By unsigned I mean at least
the format 'I' instead of 'i', if not the variable itself.)
 Any ideas?

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2005-10-04 03:10

Message:
Logged In: YES 
user_id=6656

Uh, no, that patch is about fcntl, this report is about ioctl.  ioctl has been 
fixed in CVS, afaik, so this report should probably be closed unless the 
OP shows up and tells us it isn't.

Something similar should almost certainly be done to fcntl.  That's what 
1309352 is about.  Maybe I should have fixed fcntl when I did ioctl, but I 
actually use ioctl and don't use fnctl myself...

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2005-10-03 21:49

Message:
Logged In: YES 
user_id=33168

This could be related to: patch 1309352.

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2005-08-23 05:10

Message:
Logged In: YES 
user_id=6656

I think this is fixed in CVS HEAD.  Can you try that?

As a workaround, you can probably pass ~int(~v&0xFFFFFFFF) to ioctl 
instead of v (which is very ugly, yes, but probably not as ugly as a C 
extension).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1262856&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to