[easytag/wip/application-window] Remove Unix signal handlers, bug 721943
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/application-window] Remove Unix signal handlers, bug 721943
- Date: Tue, 21 Jan 2014 20:09:31 +0000 (UTC)
commit adba99201e75a22a4ba523728b1e9af0b1b93f3a
Author: David King <amigadave amigadave com>
Date: Tue Jan 21 16:21:32 2014 +0000
Remove Unix signal handlers, bug 721943
src/easytag.c | 81 ---------------------------------------------------------
1 files changed, 0 insertions(+), 81 deletions(-)
---
diff --git a/src/easytag.c b/src/easytag.c
index 7110c82..8c77133 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -28,7 +28,6 @@
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
-#include <signal.h>
#ifdef ENABLE_MP3
#include <id3tag.h>
#endif
@@ -90,10 +89,6 @@ static gint SF_ButtonPressed_Delete_File;
/**************
* Prototypes *
**************/
-#ifndef G_OS_WIN32
-static void Handle_Crash (gint signal_id);
-#endif /* !G_OS_WIN32 */
-
static gboolean Write_File_Tag (ET_File *ETFile, gboolean hide_msgbox);
static gint Save_File (ET_File *ETFile, gboolean multiple_files,
gboolean force_saving_files);
@@ -116,36 +111,6 @@ static void Destroy_Quit_Recursion_Function_Window (void);
static void et_on_quit_recursion_response (GtkDialog *dialog, gint response_id,
gpointer user_data);
-#ifndef G_OS_WIN32
-static void
-setup_sigbus_fpe_segv (void)
-{
- struct sigaction sa;
- memset (&sa, 0, sizeof (struct sigaction));
- sa.sa_handler = Handle_Crash;
- sigaction (SIGBUS, &sa, NULL);
- sigaction (SIGFPE, &sa, NULL);
- sigaction (SIGSEGV, &sa, NULL);
-}
-
-static void
-sigchld_handler (int signum)
-{
- wait (NULL);
-}
-
-static void
-setup_sigchld (void)
-{
- struct sigaction sa;
- memset (&sa, 0, sizeof (struct sigaction));
- sa.sa_handler = sigchld_handler;
- sigemptyset (&sa.sa_mask);
- sa.sa_flags = SA_RESTART;
- sigaction (SIGCHLD, &sa, NULL);
-}
-#endif /* !G_OS_WIN32 */
-
/*
* common_init:
* @application: the application
@@ -455,14 +420,6 @@ int main (int argc, char *argv[])
bind_textdomain_codeset (PACKAGE_TARNAME, "UTF-8");
#endif /* ENABLE_NLS */
-#ifndef G_OS_WIN32
- /* Signal handling to display a message(SIGSEGV, ...) */
- setup_sigbus_fpe_segv ();
- /* Must handle this signal to avoid zombies of child processes (e.g. xmms)
- */
- setup_sigchld ();
-#endif /* !G_OS_WIN32 */
-
INIT_DIRECTORY = NULL;
#if !GLIB_CHECK_VERSION (2, 35, 1)
@@ -2378,44 +2335,6 @@ Init_Load_Default_Dir (void)
/*
- * Function to manage the received signals (specially for segfaults)
- * Handle crashs
- */
-#ifndef G_OS_WIN32
-static void
-Handle_Crash (gint signal_id)
-{
- //gchar commmand[256];
-
- Log_Print(LOG_ERROR,_("EasyTAG version %s: Abnormal exit (PID: %d)"),PACKAGE_VERSION,getpid());
- Log_Print (LOG_ERROR, _("Received signal '%s' (%d)"),
- g_strsignal (signal_id), signal_id);
-
- Log_Print(LOG_ERROR,_("You have probably found a bug in EasyTAG. Please, "
- "file a bug report with a GDB backtrace ('gdb "
- "easytag core' then 'bt' and 'l') and information "
- "to reproduce it at: %s"),PACKAGE_BUGREPORT);
-
- // To send messages to the console...
- g_print(_("EasyTAG version %s: Abnormal exit (PID: %d)."),PACKAGE_VERSION,getpid());
- g_print("\n");
- g_print (_("Received signal '%s' (%d)"), g_strsignal (signal_id),
- signal_id);
- g_print ("\a\n");
- g_print(_("You have probably found a bug in EasyTAG. Please, file a bug "
- "report with a GDB backtrace ('gdb easytag core' then 'bt' and "
- "'l') and information to reproduce it at: %s"),PACKAGE_BUGREPORT);
- g_print("\n");
-
- signal(signal_id,SIG_DFL); // Let the OS handle recursive seg faults
- //signal(SIGTSTP, exit);
- //snprintf(commmand,sizeof(commmand),"gdb -x /root/core.txt easytag %d", getpid());
- //system(commmand);
-}
-#endif /* !G_OS_WIN32 */
-
-
-/*
* Exit the program
*/
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]