Re: UNIX signal handling
- From: "Daniel Solaz" <dsolaz sistelcom com>
- To: Andy Kahn <kahn zk3 dec com>, gtk-list redhat com
- Subject: Re: UNIX signal handling
- Date: Sat, 11 Jul 1998 00:35:55 +0200
Andy Kahn wrote:
>On Fri, Jul 10, 1998 at 07:20:56PM +0200, Daniel Solaz wrote:
>>The HTML docs simply state that GTK will install several signal
>>handlers. I'm talking about unix signals now.
>>What purpose do they serve? Do they clean up things on exit? Is there
>>any reason why resetting them would be a bad idea?
>>-Daniel
>i dug around in this area as well and found that in gdk_init(), signal
>handlers are installed for SIGHUP, SIGINT, SIGQUIT, SIGBUS, SIGSEGV,
>SIGPIPE, and SIGTERM (effectively, all the "fatal" signals). they are
>all caught with one signal handler, gdk_signal(). but if you take a
>look at gdk_signal(), it really does nothing useful!
What's the purpose, then?
>as it turns out, in my opinion it's better to *NOT* have gdk/gtk catch
>any of these signals and just let the application go about as usual
>(which will probably core dump, and then you can debug the core). to
>disable gdk/gtk's behavior, you need to do one of the following when
>compiling gdk:
I prefer my libs not to differ from what others have. One never knows...
> 3. leave everything as normal, and redefine the signal
> handlers in your application. for example:
That's it. I actually code in Modula-3 (I'm working on a GTK wrapper)
and what I do is call RTSignal.RestoreHandlers() just after gtk_init().
The Modula-3 runtime installs its own handlers and I want these.
>i sent a message to this list a few weeks ago regarding this, but no
>one responded. sigh.
This was my second try, too. Thanks.
-Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]