discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Terminate NSApp gracefully when receiving SIGNIT. )Fwd: [Etoile-disc


From: Fred Kiefer
Subject: Re: Terminate NSApp gracefully when receiving SIGNIT. )Fwd: [Etoile-discuss] Etoile 0.2 on Solaris)
Date: Thu, 02 Aug 2007 09:55:26 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20060911)

Yen-Ju Chen wrote:
> On 8/1/07, Fred Kiefer <fredkiefer@gmx.de> wrote:
>> I like the idea of responding to signals properly, but checking for
>> unistd.h and then including signal.h is clearly wrong. When we add
>> something, we need to add it the clean way.
>>
>> And actually we already have this code in place. In back we have for x11
>> a very similar call to signal:
>>
>>   signal(SIGTERM, terminate);
>>
>> and terminate() is of course:
>>
>> static void
>> terminate(int sig)
>> {
>>   [NSApp terminate: NSApp];
>> }
>>
>> Now we only need to decide if we think that SIGINT should be handled the
>> same as SIGTERM. And if so add one line to XGServer.m
> 
>   The idea was to receive a signal when users logout x window.
>   The SIGINT is normally triggered ty Ctrl-C.
>   I am not sure whether it depends on the platform for logout.
> 

I understand this, still the original patch wasn't in a state to be
committed. It would break compilations on many non-standard Unix
systems.  Better to have the handling of Control-C only for the x
backend than to break the system for anybody. I am willing to apply
another patch for MS Windows, if it gets send in.

Cheers,
Fred

PS: This change should also improve the situation for Andreas Höschler,
as killed applications should now be removed from the cache more reliable.




reply via email to

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