On 13 Mar 2007, at 05:46, Yen-Ju Chen wrote:

I notice that if an application terminates abnormally,
NSWorkspace won't know it and -laucnhedApplications still return that
application.
The only way I can think about of tracking crashed application
is to use NSConnection to it, but I guess it is less efficient.
It is very easy to test. Just start an application from command line
and use Ctrl-C to terminate it.
NSWorkspace still think it is running.

Any suggestion ?

That's a documented feature ... the values in -launchedApplications are not guaranteed to be up to date.

We can't use NSConnection to tell if an app is alive, because an app launched by NSWorkspace could be something which isn't a GNUstep application (many app wrappers exist for things like mozilla and gimp).

Solutions *are* possible ... the only really reliable and portable one I can think of would be to change our app wrappers to use a tiny tool to run the unix/windows native app as a subtask and monitor the subtask.



_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to