This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Question about tty.cc
- From: Christopher Faylor <cgf-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 22 May 2002 16:24:54 -0400
- Subject: Re: Question about tty.cc
- References: <003301c201c7$06f822c0$0100a8c0@advent02>
- Reply-to: cygwin at cygwin dot com
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/