>>>>> "Xiangfu" == Xiangfu Liu <[email protected]> writes:
> Hi I fight with this issue two days. but I just don't find a good > solution. > any help will be great. > when we run 'ash' 'bash' in gmenu2x it's always give me : /bin/ash : > can't access tty; job control is turned off when start 'ash' 'bash' > (http://en.qi-hardware.com/wiki/OpenWrt_Software_Image#Image_2010-12-14 > see the * KNOWN ISSUES) Ok, after lots of trial and error, I now have a fix that works. It is *ugly*, need to clean it up a bit, but anyways: Insert this befor execlp: --8<-- for (int i = 3; i < 1024; i++) close(i); int pid = setsid(); int fd = open("/dev/tty0", O_RDWR); tcsetpgrp(fd, pid); ioctl(fd, TIOCSCTTY, (char *)1); dup2(fd, 0); dup2(fd, 1); dup2(fd, 2); close(fd); --8<-- (you also need the <sys/ioctl.h> header) The culprit is SDL I think. It gives up the controlling terminal by doing TIOCSCTTY in FB_OpenKeyboard. Now on to the next problem: with gmenu2x running on terminal #0, I do not get any colors when starting terminal programs (including emacs). Yes, that's due to the font, but maybe we then shouldn't set that special font on the first terminal where all the software runs by default? I mean black&white is so backwards :) IMO people should have to manually change to a secondary term (terminal #7?) for the extra small font. merry christmas, David -- GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
pgpESUOyZ1iSF.pgp
Description: PGP signature
_______________________________________________ Qi Hardware Discussion List Mail to list (members only): [email protected] Subscribe or Unsubscribe: http://lists.en.qi-hardware.com/mailman/listinfo/discussion

