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 fbvortex
Recipients fbvortex
Date 2007-11-20.00:27:07
SpamBayes Score 0.0016699228
Marked as misclassified No
Message-id <1195518427.96.0.197538707678.issue1471@psf.upfronthosting.co.za>
In-reply-to
Content
The following lines of code work on Linux platforms (amd64), and 32-bit
OpenBSD (i386), but not on 64-bit OpenBSD platforms (at least not on
amd64 or sparc64):

import fcntl,os,pty,termios,select,sys,struct,pwd,signal,os
pid,fd=pty.fork()
fcntl.ioctl(fd, termios.TIOCSWINSZ, struct.pack("HHHH",80,25,0,0))

This gives an "IOError: [Errno 25] Inappropriate ioctl for device"
exception.

The python version in question on OpenBSD is:

Python 2.5.1 (r251:54863, Nov 16 2007, 18:16:44) 
[GCC 3.3.5 (propolice)] on openbsd4

The winsize structure as dumped using sizeof(struct winsize) under
OpenBSD/sparc64 is 8 bytes large, and so is the result from the
struct.pack operation.  Forcing the endianness big or little in the
struct.pack formatting string has no effect on the error.
History
Date User Action Args
2007-11-20 00:27:08fbvortexsetspambayes_score: 0.00166992 -> 0.0016699228
recipients: + fbvortex
2007-11-20 00:27:07fbvortexsetspambayes_score: 0.00166992 -> 0.00166992
messageid: <1195518427.96.0.197538707678.issue1471@psf.upfronthosting.co.za>
2007-11-20 00:27:07fbvortexlinkissue1471 messages
2007-11-20 00:27:07fbvortexcreate