This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: reset/terminate problems; preventing multiple XWin instances
- From: "Ehud Karni" <ehud at unix dot mvs dot co dot il>
- To: cygwin-xfree at cygwin dot com
- Date: Thu, 4 Mar 2004 17:11:38 +0200
- Subject: Re: reset/terminate problems; preventing multiple XWin instances
- Organization: Mivtach-Simon Insurance agencies
- References: <404654C2.9010902@tromer.org>
- Reply-to: cygwin-xfree at cygwin dot com
- Reply-to: ehud at unix dot mvs dot co dot il
-----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 <http://www.keyserver.net/> 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-----