On Sat, Nov 13, 2010 at 01:57:54PM +0100, Stephan Witt wrote:

> Am 13.11.2010 um 13:46 schrieb Jean-Marc Lasgouttes:
> 
> > Le 13 nov. 10 à 12:29, Enrico Forestieri a écrit :
> >> I don't know how that single instance enforcement is attained, but if
> >> that is true, you should not be able to launch a new instance of lyx
> >> by using the --no-remote switch. So, launch lyx a first time, then try
> >> to get a new instance using "lyx --no-remote". Do you now have two
> >> different instances or not?
> > 
> > Actually, when LyX is launched via its icon or by double clicking a
> > document, the lyx binary is invoked with a special (-ss I think) argument 
> > pointing
> > to the existing instance. The new file to load appears as a window system 
> > message.
> > 
> > So, when launching LyX from the command line, your patch should do
> > the right thing (tm).
> 
> I tested it on Mac and it works as it should. With --no-remote a new instance 
> is
> started. Otherwise the running LyX opens a new window. I'd say it's ok. 
> 
> Only rare corner cases - e. g. a stopped LyX instance - may be a problem now.

Maybe less than it would appear. If LyX crashed leaving behind a stale pipe,
this is detected and no running instance is assumed to be present. Of course,
if LyX did not crash but is somehow stalled, then we would have the
problem that a document will never be opened, unless using the --no-remote
switch or killing the stalled instance. This is the price to pay for this
feature, I am sorry.

-- 
Enrico

Reply via email to