title: Warning GDB Inappropriate IOCTL for device
body: <p>I'm using a program that crashes on Linux (and works fine on Windows) and I don't know why.
  I've got quite a strange error, which is : <code>&amp;"warning: GDB: Failed to set controlling terminal: Inappropriate ioctl for devide\n"</code> when I launch the debugger.</p>
  
  <p>Informations I found on the internet made me think it has something to do with an output.</p>
  
  <p>The concerned file crashes at <code>lign 0</code> and contains only this function :</p>
  
  <pre><code>void Sync_Print::stdOutFormat (const char* format, ...) {
      va_list args;
      va_start(args, format);
      Locker Protect (Synchro);
      ::vprintf(format, args);
      va_end(args);
  }
  </code></pre>
  
  <p><code>Sync_Print</code> is the name for my class that implements <code>static void stdOutFormat(const char* format, ...);</code> and <code>static Mutex Synchro;</code></p>
  
  <p>In my debugger on QtCreator, it says that the program crashed in the file named <code>/lib/ld-linux.so.2</code> on lign 0. The program crashes immediately, I can't even output anything using <code>std</code> ... Even with an empty main and no include it crashes.</p>
  
  <p>I'm kinda lost here ... I don't know if it would be accurate to give more code. If you need any precisions I'd be glad to give them ...</p>
  
  <p>I'm under Linux Ubuntu 12.04, with QtCreator and GCC 4.7.2. I'm using Qt 4.</p>