+ #else
+ giTerminalFD = 1;
+ giTerminalFD_Input = 0;
+ // Check that the console is a PTY
+ // - _SysIOCtl(..., 0, NULL) returns the type, which should be 2
+ rv = _SysIOCtl(1, DRV_IOCTL_TYPE, NULL);
+ if( rv != DRV_TYPE_TERMINAL )
+ {
+ fprintf(stderr, "stdout is not a PTY, can't start (%i exp, %i got)\n",
+ DRV_TYPE_TERMINAL, rv);
+ _SysDebug("stdout is not an PTY, can't start");
+ exit(-1);
+ }
+ #endif
+
+ // TODO: Check terminal echoback that it does support graphical modes
+ // And/or have terminal flags fetchable by the client
+