X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 31 May 2010 12:47:31 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: "can't create master tty" errors Message-ID: <20100531164731.GE18315@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20100309180647 DOT GB3442 AT sunray DOT mv DOT cariden DOT com> <416096c61003091250p186ac05bj8b0b4f7c2b224c85 AT mail DOT gmail DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Mon, May 31, 2010 at 12:39:30PM +0100, Andy Koppe wrote: >On 9 March 2010 21:50, Andy Koppe wrote: >> Cesar Crusius: >>> I am using Cygwin and SSH to do automated remote builds using Visual >>> C++. It works for a few days, but invariably things start failing with >>> messages like these (this one from a build log): >>> >>> Makefile:9: MakePID: 5964 >>> ?? ?? ??1 [main] env 2748 C:\cygwin\bin\env.exe: *** fatal error - can't create master tty >> >> The number of tty devices is limited, so the first thing to check is >> whether your build system simply leaves too many sessions open, by >> checking the output of 'ps'. >> >> If not, it might be to do with the following. If you open a couple of >> terminals, they're assigned ??tty0 and tty1. If you then close tty1 and >> open another terminal, that again becomes tty1. But if you close tty0, >> and open yet another one, that becomes tty2 rather than tty0. >> >> That appears to be the general rule: a new terminal gets the next ID >> above the current highest one. This means, however, that if opening >> and closing of terminal sessions is interleaved in certain ways, >> Cygwin might eventually run out of terminal IDs, even if only few of >> them are actually used. High numbers in the TTY column of the 'ps' >> output would point to that. >> >> Cgf, am I talking rubbish here? > >For the record: I was. What I observed there was due to a bug in >mintty: a new mintty session spawned using Alt+F2 inherited the pty >file descriptor from its parent, and by extension, also the >descriptors from its previous ancestors. Due to that, a pty device >wasn't released until the session that actually used it and all the >sessions spawned from that were closed. Fixed for mintty-0.7. > >So pty numbers are reused just fine, and I can't help with the OP's issue. I don't remember responding to the original message so, if I didn't, I apologize. It sounds like you've got things figured out though. Thanks, as always, for your amazing support of mintty. I wonder if it's time to just make it the default for the cygwin terminal, knowing that some windows apps won't work quite right. We seem to get enough "Cygwin's terminal emulation suck!" messages that I think they might outweigh the counter complaints about some windows apps not working correctly. cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple