This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about tty.cc


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]