Question about tty.cc
Christopher Faylor
cgf-cygwin@cygwin.com
Wed May 22 16:50:00 GMT 2002
On Wed, May 22, 2002 at 08:29:44PM +0100, Chris January wrote:
>I've tracked down the "dup(/dev) failed" on startup error to the following
>section of code in tty.cc :
>
> char buf[40];
>
> __small_sprintf (buf, "cygwin.find.console.%d", myself->pid);
> SetConsoleTitle (buf);
> Sleep (40);
> console = FindWindow (NULL, buf);
> SetConsoleTitle (oldtitle);
> Sleep (40);
> ReleaseMutex (title_mutex);
> if (console == NULL)
> {
> termios_printf ("Can't find console window");
> return -1;
> }
>
>Can anyone tell me what the Sleep (40) lines are there for? If they are
>there to give the console window time to appear, may I suggest the delay is
You could suggest that but you'd need a lot more justification. The code
in question is many years old.
It's not obvious to me how this translates into an "unable to dup" error.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list