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 &quot;bad behaving code&quot;:<br>
<br><br><br>int main()<br>{<br><br>   int t = -1;<br><br>   int tty0_fd = open(&quot;/dev/tty0&quot;, O_WRONLY, 0);<br>   if( tty0_fd &lt; 0)<br>   {<br>      printf(&quot;cannot open /dev/tty0\n&quot;);<br>      return -1;<br>
   }<br>   else<br>   {<br>      ioctl(tty0_fd, VT_OPENQRY, &amp;t);<br><br>      printf(&quot;new t: %d\n&quot;, t);<br><br>   }<br>   static const char * const vcs =  &quot;/dev/tty%d&quot;;<br><br>   char vtpath[12];<br>
   sprintf(vtpath, vcs, t);<br><br>   int keyboard_fd = open(vtpath, O_RDWR, 0);<br>   if(keyboard_fd &lt; 0)<br>   {<br><br>      printf(&quot;cannot open %s\n&quot;, vtpath);<br>      return -2;<br>   }<br><br>   printf(&quot;kbfd: %d\n&quot;, 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>