[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#44093: libc: ioctl can cause errno=EIO



Package: libc6
Version: 2.1.1-12 

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.

Regards,
-- 
Yann Dirson                         |    Why make M$-Bill richer & richer ?
           <ydirson@multimania.com> |   Support Debian GNU/Linux:
debian-email:   <dirson@debian.org> | Cheaper, more Powerful, more Stable !
http://www.multimania.com/ydirson/  | Check <http://www.debian.org/>


Reply to: