[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KApplicationServer?
From:       Tim Jansen <ml () tjansen ! de>
Date:       2002-08-25 15:26:08
[Download RAW message or body]

On Sunday 25 August 2002 14:56, Friedrich W. H. Kossebau wrote:
> * for kuniqueapplication check if an instance is already running by a
> simpel lookup in the table of running apps. Should be a lot quicker than
> to first go the long way of loading and linking the executable only to
> find out there already exists an instance.

I also thought about doing something like this. The trick is to use the 
X-DCOP-ServiceType in the .desktop file, and if the app to start is a unique 
app, just ask the window manager to show the app's window instead of starting 
the new process. Unless somebody finds a reason against this, a patch for 3.2 
would be appreciated :)

(BTW There is no need to have a special table of apps, because each KUniqueApp 
is already registered in the DCOP server).


> * for _stable_ running normal kapplications the request for a new
> document window would be transported (via DCOP) to an already running
> instance of the same app. Perhaps this could be limited to the scope of
> a desktop so that in the case of a crash one doesn't loose all windows
> of an app.

The problem here is that in the case of a crash you lose everything. That is 
why I often have several instances of Konqui running instead of opening new 
windows. 
But it should be possible that the app launcher sends a DCOP message to a 
running instance of the app to ask whether the app would like to open a new 
window or the launcher should create a new process.


> 1. Now I am curious whether there is already such an infrastructure in
> KDE 3.

No.

> 2. Would it be possible to get another independently running instance of
> an app (e.g. kwrite) by doing a fork() (no experience) in the app, this
> way circumventing the loading and linking while being save from the
> crash in another "window" of the app?

kdeinit already uses forking to avoid some linking. Doing a fork in an app 
that is already running would be extremely complicated (because that would 
duplicate everything, including things like the X11 connection and the DCOP 
handle).

bye...

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic