On 3/13/07, Richard Frith-Macdonald <[EMAIL PROTECTED]> wrote:
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.
Sorry for not being clear. I am referring to GNUstep application, not XWindow application. I can track XWindow application through X protocol. For GNUstep application, I guess NSConnection would be my only solution. Since it is a documented behavior, I will work my way out. By the way, is GNUstep interested to receive a distributed notification for abnormally terminated application ? As long as the name of notification exists in GNUstep (probably as GNUstep additional), it should be trivial to implement. Thanx. Yen-Ju
_______________________________________________ Discuss-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnustep
