From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1403 invoked by alias); 4 Mar 2004 15:11:42 -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 1395 invoked from network); 4 Mar 2004 15:11:40 -0000 Received: from unknown (HELO unix.mvs.co.il) (192.114.178.12) by sources.redhat.com with SMTP; 4 Mar 2004 15:11:40 -0000 Received: from beta.mvs.co.il (beta [10.253.0.3]) by unix.mvs.co.il (8.12.10/8.12.10) with ESMTP id i24FBcXn002306 for ; Thu, 4 Mar 2004 17:11:38 +0200 Received: from beta.mvs.co.il (localhost [127.0.0.1]) by beta.mvs.co.il (8.12.10/8.12.10) with ESMTP id i24FBch3017247 for ; Thu, 4 Mar 2004 17:11:38 +0200 Received: (from root@localhost) by beta.mvs.co.il (8.12.10/8.12.10/Submit) id i24FBcOQ017243; Thu, 4 Mar 2004 17:11:38 +0200 Date: Thu, 04 Mar 2004 15:11:00 -0000 Message-Id: <200403041511.i24FBcOQ017243@beta.mvs.co.il> From: "Ehud Karni" To: cygwin-xfree@cygwin.com Subject: Re: reset/terminate problems; preventing multiple XWin instances In-reply-to: <404654C2.9010902@tromer.org> (cygwinx2eran@tromer.org) Organization: Mivtach-Simon Insurance agencies Reply-to: ehud@unix.mvs.co.il References: <404654C2.9010902@tromer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-8-i Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00113.txt.bz2 List-Id: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 03 Mar 2004 23:57:22 +0200, cygwinx2eran@tromer.org wrote: > > On 29-02-2004 14:11, Takuma Murakami wrote: > > >> As for preventing multiple instances of XWin > > This feature is already implemented in my local tree (not > > port based but mutex based detection). > > I see that it's in 4.3.0-50 and working well, but I don't see how the > current implementation addresses the common task I mentioned: > "open an xterm; run XWin first if needed" > If I use a batchfile that always runs XWin and then xterm, from the 2nd > invocation onwards it will produce the error popup reporting a "Fatal > error" and directing me a to log file... Not quite what's needed here.[1] I have a similar problem on Linux (I use VNC virtual DISPLAY). My solution is to use a shell script and check for the open port by trying to connect to it. If this fails 5 times, I assume it is not existing and do whats needed (I do check from remote computers too, so "whats needed" varies). If the connection succeeds the application is run with this DISPLAY. I wrote a small program that does the connect with timeout, and a simple bash script that ensures killing the test program if it hangs (which sometimes occurs). Ehud. - -- Ehud Karni Tel: +972-3-7966-561 /"\ Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign Insurance agencies (USA) voice mail and X Against HTML Mail http://www.mvs.co.il FAX: 1-815-5509341 / \ GnuPG: 98EA398D Better Safe Than Sorry -----BEGIN PGP SIGNATURE----- Comment: use http://www.keyserver.net/ to get my key (and others) iD8DBQFAR0cpLFvTvpjqOY0RAicrAJ9UfYPtmrdkZAEWvN0Wfn0dLT6iTACfW5ih RTiI7UHJFx241QhRVoJ6V8w= =Omh6 -----END PGP SIGNATURE-----