Help wanted, setconsole problem
ralda at gmx.de
ralda at gmx.de
Tue Apr 3 21:57:13 UTC 2012
Update after some more tests ...
> setconsole /dev/tty63
>
> echo "Test" >/dev/console
> sh: write error: Bad file descriptor
> (strace verified: the write call fails with Bad file descriptor)
After a long search I found the right Gentoo package to install
the upstream version of setconsole ... and that one works !
setconsole /dev/tty63 </dev/console
echo "Test" >/dev/console
Outputs the expected "Test" on tty63
So strace reveals some differences:
Upstream setconsole does:
open /dev/tty63, O_WRONLY|O_NONBLOCK -> fd 3
ioctl 3, TCGETS
ioctl 0, TIOCCONS
ioctl 3, TIOCCONS
close 3
Busybox setconsole does:
open /dev/tty63, O_RDONLY|O_LARGEFILE -> fd 3
ioctl 3, TIOCCONS
As I can't recompile Busybox currently I'm not able to verify what is
the exact reason for the problem. Is anybody able to verify the
problem? May be it is Linux kernel specific. I know newer kernel
changed something on code of console switch.
--
Harald
More information about the busybox
mailing list