From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30543 invoked by alias); 4 Mar 2004 15:05:52 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Reply-To: cygwin-xfree@cygwin.com Received: (qmail 30536 invoked from network); 4 Mar 2004 15:05:51 -0000 Received: from unknown (HELO sys19.mail.msu.edu) (35.9.75.119) by sources.redhat.com with SMTP; 4 Mar 2004 15:05:51 -0000 Received: from [207.179.68.222] (helo=msu.edu) by sys19.mail.msu.edu with asmtp (Exim 4.24 #37) (TLSv1:AES256-SHA:256) id 1AyuQ3-0004Va-F0 for cygwin-xfree@cygwin.com; Thu, 04 Mar 2004 10:05:51 -0500 Message-ID: <404745CF.5070606@msu.edu> Date: Thu, 04 Mar 2004 15:05:00 -0000 From: Harold L Hunt II User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) MIME-Version: 1.0 To: cygwin-xfree@cygwin.com Subject: Re: reset/terminate problems; preventing multiple XWin instance References: <4047282E.8010705@tromer.org> In-Reply-To: <4047282E.8010705@tromer.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus: None found by Clam AV X-SW-Source: 2004-03/txt/msg00111.txt.bz2 List-Id: I actually have a fairly long laundry list of things that I am going to be doing for this "open a unique display number problem". One of them is to add some options for specifying what to do if a particular display cannot be opened (-display-or-die), others either let you specify whether to assign display 5 (-auto-display-reuse) if 1-4 and 6-10 were used or let you specify to assign display 11 (-auto-display-highest) in that same case. I guess the next thing we need then is a way to have the just-started XWin process report the display number that it got. I am thinking of several ways to do this, but I haven't stumbled across the optimal solution yet. By the way, the way that I am a proposing to solve the display assignment problem should fix cases where only Cygwin/X is being used without race conditions (ideally), but I am going to allow for race conditions when other X Servers are also being used on the same machine, since there doesn't seem to be a uniform way to inform them that certain displays are in use already, nor is there an atomic way to decide to use a display number and lock it before any random process could also try to open that port (at least not that I can think of). All in all, we will be a heck of a lot better off than we are now. Harold cygwinx2eran@tromer.org wrote: > On 2004-03-04 13:12, Alexander Gottwald wrote: > > >>if ! xdpyinfo >/dev/null 2>&1; then > > > Cygwin's xdpyinfo waits for 6 second before giving up. A couple of days > ago I posted an alternative solution using netstat, which doesn't have > this delay. Both suffer from race conditions, which are quite likely to > occur in practice -- say, a user clicks his "Cygwin xterm" icon twice in > succession to open two xterms, and as a result gets two XWin instances. > > Eran >