Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 22 May 2002 16:24:54 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Question about tty.cc Message-ID: <20020522202454.GA20138@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <003301c201c7$06f822c0$0100a8c0 AT advent02> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <003301c201c7$06f822c0$0100a8c0@advent02> User-Agent: Mutt/1.3.23.1i 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/