reset/terminate problems; preventing multiple XWin instances
Takuma Murakami
takuma@dgp.ne.jp
Thu Mar 4 09:02:00 GMT 2004
Eran,
> 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]
>
> Perhaps there should be a switch that says "if the display already
> exists, exit silently".
I agree. We should have an option like "-silent" or "-quiet".
> But that doesn't solve the case where I want to run additional programs
> (say, twm and xeyes) whenever a new display is created -- again a common
> scenario, I believe. One way to solve this is to add an option for
> checking the presence of an XWin instance on the given display number
> and exiting immediately with a corresponding errorcode; a batchfile can
> then check for the existance of an XWin instance, and if negative spawn
> XWin and related stuff. But this could lead to a race condition if two
> batchfiles do the check simultaneously. An alternative is to add an
> option for XWin to run some executable iff its startup succeeded.
Let's suppose Cygwin/X has -silent option as above: then I
think startxwin.bat with -silent option is sufficient for your
purpose. It will start a server (which silently fails if there
is the other) and then start some favorite applications.
Takuma Murakami
More information about the Cygwin-xfree
mailing list