gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Graceful termination again


From: Richard Frith-Macdonald
Subject: Re: Graceful termination again
Date: Mon, 23 Jan 2006 20:31:59 +0000


On 23 Jan 2006, at 16:38, Fred Kiefer wrote:

Roman Belenov wrote:

1) How to get a list of all running GNUstep applications ?
launchedApplications seems to return only the list of apps launched from the current one. For now I just use a list of message ports obtained by examining corresponding subdirectory and treat everythying as a proxy for application.


We really should get [NSWorkspace launchedApplications] working. Some
years ago I suggested a solution for this involving some extensisons to
gdomap. Now with gdomap being used less often we will need a more
general way to implement it. Perhaps there is the possibility to extend
NSPortnameServer (or rather its subclasses) to return a list of all
known ports. The NSWorkspace method would then only need to filter out
the no longer working ports and restict the returned list to the ones
representing applications.

Richard,
do you like that concept and would you be willing to implement the base part of it? More or less it would be an official implementation of what
Roman is doing anyway.

I think the concept is fundamentally broken ... since the list of ports is not the list of applications, so you would need to filter them in some way (which probably means an intrusive probe of some sort applied to all the ports which are not application ports), and while any programs using ports should not care about being sent unexpected messages, they are entitled to be annoyed by it.

The issue needs fixing at the gui library level, listing launched applications is not an issue for the base library and is not related to ports except in a very incidental manner.

We could finish getting the NSWorkspace class to do what it was originally designed to do ... provide the list of launched apps as supplied by the workspace manager. That would be a small modification to NSWorkspace and to GWorkspace. However, we would want some fallback option for if/when GWorkspace is not running. Perhaps a minimal workspace manager daemon, or perhaps NSWorkspace could write to a small database (eg a plist file in a temporary directory) to maintain the state information. The latter has the advantages of not requiring an additional daemon to run (I have no problem with daemons, but I know many people have objections to them) and is persistent if the workspace manager is restarted (we need that). The former has the advantages that it would provide a testbed and reference implementation for workspace managers. I suppose we could do both.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]