* newsym: First stab at understanding data as well as functions.

* pipe.cc (fhandler_pipe::init): Move more intelligence here.
(fhandler_pipe::create): Simplify based on above change.

* tty.cc (tty_list::allocate): Remove non-NT code.
This commit is contained in:
Christopher Faylor
2008-01-01 18:51:23 +00:00
parent b918632a2a
commit 8528ecbde8
5 changed files with 2799 additions and 2808 deletions

View File

@@ -227,31 +227,8 @@ tty_list::allocate (bool with_console)
console = NULL;
else if (!(console = GetConsoleWindow ()))
{
char oldtitle[TITLESIZE];
if (!GetConsoleTitle (oldtitle, TITLESIZE))
{
termios_printf ("Can't read console title");
goto out;
}
char buf[40];
__small_sprintf (buf, "cygwin.find.console.%d", myself->pid);
SetConsoleTitle (buf);
for (int times = 0; times < 25; times++)
{
Sleep (10);
if ((console = FindWindow (NULL, buf)))
break;
}
SetConsoleTitle (oldtitle);
Sleep (40);
if (console == NULL)
{
termios_printf ("Can't find console window");
goto out;
}
termios_printf ("Can't find console window");
goto out;
}
/* Is a tty allocated for console? */