From 58475f05a54f7a165fe92adf8358f59cf0223c08 Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Tue, 15 Dec 1998 07:08:05 +0000 Subject: acconfig.h removed IPC_RMID_DEFERRED_RELEASE check * acconfig.h * configure.in: removed IPC_RMID_DEFERRED_RELEASE check * gdk/gdk.c: remove signal handlers, since we do an IPC_RMID after XShmAttach, and nobody complained -Yosh --- gdk/gdk.c | 82 --------------------------------------------------- gdk/x11/gdkmain-x11.c | 82 --------------------------------------------------- 2 files changed, 164 deletions(-) (limited to 'gdk') diff --git a/gdk/gdk.c b/gdk/gdk.c index 15dcaa303..117f4534f 100644 --- a/gdk/gdk.c +++ b/gdk/gdk.c @@ -18,12 +18,8 @@ */ #include "config.h" -/* If you don't want to use gdk's signal handlers define this */ -/* #define I_NEED_TO_ACTUALLY_DEBUG_MY_PROGRAMS 1 */ - #include #include -#include #include #include #include @@ -131,7 +127,6 @@ static void gdk_exit_func (void); static int gdk_x_error (Display *display, XErrorEvent *error); static int gdk_x_io_error (Display *display); -static RETSIGTYPE gdk_signal (int signum); GdkFilterReturn gdk_wm_protocols_filter (GdkXEvent *xev, GdkEvent *event, @@ -256,16 +251,6 @@ gdk_init (int *argc, X_GETTIMEOFDAY (&start); -#ifndef I_NEED_TO_ACTUALLY_DEBUG_MY_PROGRAMS - signal (SIGHUP, gdk_signal); - signal (SIGINT, gdk_signal); - signal (SIGQUIT, gdk_signal); - signal (SIGBUS, gdk_signal); - signal (SIGSEGV, gdk_signal); - signal (SIGPIPE, gdk_signal); - signal (SIGTERM, gdk_signal); -#endif - gdk_display_name = NULL; XSetErrorHandler (gdk_x_error); @@ -3111,73 +3096,6 @@ gdk_x_io_error (Display *display) return 0; } -/* - *-------------------------------------------------------------- - * gdk_signal - * - * The signal handler. - * - * Arguments: - * "sig_num" is the number of the signal we received. - * - * Results: - * The signals we catch are all fatal. So we simply build - * up a nice little error message and print it and exit. - * If in the process of doing so another signal is received - * we notice that we are already exiting and simply kill - * our process. - * - * Side effects: - * - *-------------------------------------------------------------- - */ - -static RETSIGTYPE -gdk_signal (int sig_num) -{ - static int caught_fatal_sig = 0; - char *sig; - - if (caught_fatal_sig) - kill (getpid (), sig_num); - caught_fatal_sig = 1; - - switch (sig_num) - { - case SIGHUP: - sig = "sighup"; - break; - case SIGINT: - sig = "sigint"; - break; - case SIGQUIT: - sig = "sigquit"; - break; - case SIGBUS: - sig = "sigbus"; - break; - case SIGSEGV: - sig = "sigsegv"; - break; - case SIGPIPE: - sig = "sigpipe"; - break; - case SIGTERM: - sig = "sigterm"; - break; - default: - sig = "unknown signal"; - break; - } - - g_message ("\n** ERROR **: %s caught", sig); -#ifdef G_ENABLE_DEBUG - abort (); -#else /* !G_ENABLE_DEBUG */ - gdk_exit (1); -#endif /* !G_ENABLE_DEBUG */ -} - /* Sends a ClientMessage to all toplevel client windows */ gboolean gdk_event_send_client_message (GdkEvent *event, guint32 xid) diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index 15dcaa303..117f4534f 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -18,12 +18,8 @@ */ #include "config.h" -/* If you don't want to use gdk's signal handlers define this */ -/* #define I_NEED_TO_ACTUALLY_DEBUG_MY_PROGRAMS 1 */ - #include #include -#include #include #include #include @@ -131,7 +127,6 @@ static void gdk_exit_func (void); static int gdk_x_error (Display *display, XErrorEvent *error); static int gdk_x_io_error (Display *display); -static RETSIGTYPE gdk_signal (int signum); GdkFilterReturn gdk_wm_protocols_filter (GdkXEvent *xev, GdkEvent *event, @@ -256,16 +251,6 @@ gdk_init (int *argc, X_GETTIMEOFDAY (&start); -#ifndef I_NEED_TO_ACTUALLY_DEBUG_MY_PROGRAMS - signal (SIGHUP, gdk_signal); - signal (SIGINT, gdk_signal); - signal (SIGQUIT, gdk_signal); - signal (SIGBUS, gdk_signal); - signal (SIGSEGV, gdk_signal); - signal (SIGPIPE, gdk_signal); - signal (SIGTERM, gdk_signal); -#endif - gdk_display_name = NULL; XSetErrorHandler (gdk_x_error); @@ -3111,73 +3096,6 @@ gdk_x_io_error (Display *display) return 0; } -/* - *-------------------------------------------------------------- - * gdk_signal - * - * The signal handler. - * - * Arguments: - * "sig_num" is the number of the signal we received. - * - * Results: - * The signals we catch are all fatal. So we simply build - * up a nice little error message and print it and exit. - * If in the process of doing so another signal is received - * we notice that we are already exiting and simply kill - * our process. - * - * Side effects: - * - *-------------------------------------------------------------- - */ - -static RETSIGTYPE -gdk_signal (int sig_num) -{ - static int caught_fatal_sig = 0; - char *sig; - - if (caught_fatal_sig) - kill (getpid (), sig_num); - caught_fatal_sig = 1; - - switch (sig_num) - { - case SIGHUP: - sig = "sighup"; - break; - case SIGINT: - sig = "sigint"; - break; - case SIGQUIT: - sig = "sigquit"; - break; - case SIGBUS: - sig = "sigbus"; - break; - case SIGSEGV: - sig = "sigsegv"; - break; - case SIGPIPE: - sig = "sigpipe"; - break; - case SIGTERM: - sig = "sigterm"; - break; - default: - sig = "unknown signal"; - break; - } - - g_message ("\n** ERROR **: %s caught", sig); -#ifdef G_ENABLE_DEBUG - abort (); -#else /* !G_ENABLE_DEBUG */ - gdk_exit (1); -#endif /* !G_ENABLE_DEBUG */ -} - /* Sends a ClientMessage to all toplevel client windows */ gboolean gdk_event_send_client_message (GdkEvent *event, guint32 xid) -- cgit v1.2.1