Bug#44093: libc: ioctl can cause errno=EIO
It occurs that "ioctl(fd, VT_ACTIVATE, n)" returns -1, with errno set
to EIO ("Input/output error"), but this value is not documented in the
manpage, so I can't understand what's going on.
I use a 2.2.12 kernel, but people seem to have had this problem
("openvt -s -w" not switching back, ioctl return value was silently
ignored) since quite some time now (first Debian bug report in April 99)
[note I have a kludge for this bug, but understanding why I get EIO
without it will surely help me understanding why the kludge works ;]
I can think of several possibilities:
* libc error while translating syscall error code into errno (don't
know much about how it's done, however)
* sys_ioctl() really returning -EIO, which I could not find an
occurence in ioctl.c:sysioctl(), console.c:vt_ioctl() (except for
KDFONTOP - not relevant here), vt.c:vc_allocate(), although some of
them appear to be able to return things like -EPERM, -ENXIO, which I
can't see translating into EIO ...
Thus I suspect the problem may be in libc. Please feel free to
reassign if I'm wrong.
Yann Dirson | Why make M$-Bill richer & richer ?
<email@example.com> | Support Debian GNU/Linux:
debian-email: <firstname.lastname@example.org> | Cheaper, more Powerful, more Stable !
http://www.multimania.com/ydirson/ | Check <http://www.debian.org/>