Hello,<br><br><br>anybody can help with this? I think that there is a bug with our keyboard driver...<br><br>any sdl application hang in the following call, if started second time...<br><br>I reproduced in a simplified the "bad behaving code":<br>
<br><br><br>int main()<br>{<br><br> int t = -1;<br><br> int tty0_fd = open("/dev/tty0", O_WRONLY, 0);<br> if( tty0_fd < 0)<br> {<br> printf("cannot open /dev/tty0\n");<br> return -1;<br>
}<br> else<br> {<br> ioctl(tty0_fd, VT_OPENQRY, &t);<br><br> printf("new t: %d\n", t);<br><br> }<br> static const char * const vcs = "/dev/tty%d";<br><br> char vtpath[12];<br>
sprintf(vtpath, vcs, t);<br><br> int keyboard_fd = open(vtpath, O_RDWR, 0);<br> if(keyboard_fd < 0)<br> {<br><br> printf("cannot open %s\n", vtpath);<br> return -2;<br> }<br><br> printf("kbfd: %d\n", keyboard_fd);<br>
<br> if ( ioctl(keyboard_fd, VT_ACTIVATE, t) == 0 ) {<br> ioctl(keyboard_fd, VT_WAITACTIVE, t);<br> <br> //this never exits......<br><br> }<br><br><br>}<br><br><br><br clear="all"><br>-- <br>rgrds,<br>mobi phil<br>
<br>being mobile, but including technology<br><a href="http://mobiphil.com">http://mobiphil.com</a><br>