annotate src/audacious/signals.c @ 2674:f3ee0b78150a trunk

[svn] - use pthread_sigmask(SIG_BLOCK, ...) instead of of SIG_SETMASK
author nenolod
date Tue, 10 Apr 2007 14:16:32 -0700
parents 78a8b3095274
children 52785bdac597
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1 /*
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2 * Audacious
2638
12a8681e144a [svn] - reassign copyright to yaz.
nenolod
parents: 2630
diff changeset
3 * Copyright (c) 2005-2007 Yoshiki Yazawa
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
4 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
7 * the Free Software Foundation; under version 2 of the License.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
8 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
12 * GNU General Public License for more details.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
13 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
15 * along with this program; if not, write to the Free Software
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
17 * 02110-1301, USA.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
18 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
19
2666
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
20 #define _XOPEN_SOURCE
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
21 #include <unistd.h> /* for signal_check_for_broken_impl() */
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
22
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
23 #include <glib.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
24 #include <glib/gi18n.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
25 #include <glib/gprintf.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
26 #include <config.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
27 #include <stdlib.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
28 #include <unistd.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
29 #include <sys/types.h>
2674
f3ee0b78150a [svn] - use pthread_sigmask(SIG_BLOCK, ...) instead of of SIG_SETMASK
nenolod
parents: 2666
diff changeset
30 #include <pthread.h> /* for pthread_sigmask() */
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
31 #include <signal.h>
2666
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
32 #include <strings.h>
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
33
2661
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
34 #ifdef HAVE_EXECINFO_H
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
35 # include <execinfo.h>
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
36 #endif
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
37
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
38 #include "main.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
39 #include "ui_main.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
40 #include "signals.h"
2661
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
41 #include "build_stamp.h"
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
42
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
43 static void
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
44 signal_process_segv(void)
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
45 {
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
46 g_printerr(_("\nAudacious has caught signal 11 (SIGSEGV).\n\n"
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
47 "We apologize for the inconvenience, but Audacious has crashed.\n"
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
48 "This is a bug in the program, and should never happen under normal circumstances.\n"
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
49 "Your current configuration has been saved and should not be damaged.\n\n"
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
50 "You can help improve the quality of Audacious by filing a bug at http://bugs-meta.atheme.org\n"
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
51 "Please include the entire text of this message and a description of what you were doing when\n"
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
52 "this crash occured in order to quickly expedite the handling of your bug report:\n\n"));
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
53
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
54 g_printerr("Program version: Audacious %s (buildid: %s)\n\n", VERSION, svn_stamp);
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
55
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
56 #ifdef HAVE_EXECINFO_H
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
57 {
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
58 void *stack[20];
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
59 size_t size;
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
60 char **strings;
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
61 size_t i;
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
62
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
63 size = backtrace(stack, 20);
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
64 strings = backtrace_symbols(stack, size);
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
65
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
66 g_printerr("Stacktrace (%zd frames):\n", size);
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
67
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
68 for (i = 0; i < size; i++)
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
69 g_printerr(" %d. %s\n", i + 1, strings[i]);
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
70
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
71 g_free(strings);
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
72 }
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
73 #else
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
74 g_printerr("Stacktrace was unavailable.\n");
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
75 #endif
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
76
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
77 g_printerr(_("\nBugs can be reported at http://bugs-meta.atheme.org against the Audacious product.\n"));
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
78
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
79 g_critical("Received SIGSEGV -- Audacious has crashed.");
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
80
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
81 bmp_config_save();
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
82 abort();
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
83 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
84
2629
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
85 static void *
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
86 signal_process_signals (void *data)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
87 {
2629
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
88 sigset_t waitset;
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
89 int sig;
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
90
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
91 sigemptyset(&waitset);
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
92 sigaddset(&waitset, SIGPIPE);
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
93 sigaddset(&waitset, SIGSEGV);
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
94 sigaddset(&waitset, SIGINT);
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
95 sigaddset(&waitset, SIGTERM);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
96
2629
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
97 while(1) {
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
98 sigwait(&waitset, &sig);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
99
2629
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
100 switch(sig){
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
101 case SIGPIPE:
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
102 /*
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
103 * do something.
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
104 */
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
105 break;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
106
2629
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
107 case SIGSEGV:
2661
f6c7271df7de [svn] - use execinfo.h to provide more useful information about crashes
nenolod
parents: 2638
diff changeset
108 signal_process_segv();
2629
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
109 break;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
110
2629
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
111 case SIGINT:
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
112 g_print("Audacious has received SIGINT and is shutting down.\n");
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
113 mainwin_quit_cb();
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
114 break;
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
115
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
116 case SIGTERM:
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
117 g_print("Audacious has received SIGTERM and is shutting down.\n");
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
118 mainwin_quit_cb();
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
119 break;
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
120 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
121 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
122
2629
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
123 return NULL; //dummy
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
124 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
125
2664
1d9c5db3341d [svn] - handle sigwait(2) brokenness on linuxthreads
nenolod
parents: 2661
diff changeset
126 /* sets up blocking signals for pthreads.
1d9c5db3341d [svn] - handle sigwait(2) brokenness on linuxthreads
nenolod
parents: 2661
diff changeset
127 * linuxthreads sucks and needs this to make sigwait(2) work
1d9c5db3341d [svn] - handle sigwait(2) brokenness on linuxthreads
nenolod
parents: 2661
diff changeset
128 * correctly. --nenolod
2666
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
129 *
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
130 * correction -- this trick does not work on linuxthreads.
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
131 * going to keep it in it's own function though --nenolod
2664
1d9c5db3341d [svn] - handle sigwait(2) brokenness on linuxthreads
nenolod
parents: 2661
diff changeset
132 */
1d9c5db3341d [svn] - handle sigwait(2) brokenness on linuxthreads
nenolod
parents: 2661
diff changeset
133 static void
1d9c5db3341d [svn] - handle sigwait(2) brokenness on linuxthreads
nenolod
parents: 2661
diff changeset
134 signal_initialize_blockers(void)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
135 {
2629
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
136 sigset_t blockset;
2486
113f75c7b0ce [svn] - make SIGTERM handler always work.
yaz
parents: 2373
diff changeset
137
2629
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
138 sigemptyset(&blockset);
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
139 sigaddset(&blockset, SIGPIPE);
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
140 sigaddset(&blockset, SIGSEGV);
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
141 sigaddset(&blockset, SIGINT);
021321cb5426 [svn] simplify and enhance signal handler:
yaz
parents: 2486
diff changeset
142 sigaddset(&blockset, SIGTERM);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
143
2674
f3ee0b78150a [svn] - use pthread_sigmask(SIG_BLOCK, ...) instead of of SIG_SETMASK
nenolod
parents: 2666
diff changeset
144 if(pthread_sigmask(SIG_BLOCK, &blockset, NULL))
2664
1d9c5db3341d [svn] - handle sigwait(2) brokenness on linuxthreads
nenolod
parents: 2661
diff changeset
145 g_print("pthread_sigmask() failed.\n");
1d9c5db3341d [svn] - handle sigwait(2) brokenness on linuxthreads
nenolod
parents: 2661
diff changeset
146 }
1d9c5db3341d [svn] - handle sigwait(2) brokenness on linuxthreads
nenolod
parents: 2661
diff changeset
147
2666
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
148 static gboolean
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
149 signal_check_for_broken_impl(void)
2664
1d9c5db3341d [svn] - handle sigwait(2) brokenness on linuxthreads
nenolod
parents: 2661
diff changeset
150 {
2666
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
151 #ifdef _CS_GNU_LIBPTHREAD_VERSION
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
152 {
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
153 gchar str[1024];
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
154 confstr(_CS_GNU_LIBPTHREAD_VERSION, str, sizeof(str));
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
155
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
156 if (!strncasecmp("linuxthreads", str, 12))
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
157 return TRUE;
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
158 }
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
159 #endif
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
160
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
161 return FALSE;
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
162 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
163
2666
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
164 void
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
165 signal_handlers_init(void)
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
166 {
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
167 if (signal_check_for_broken_impl() != TRUE)
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
168 {
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
169 signal_initialize_blockers();
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
170 g_thread_create(signal_process_signals, NULL, FALSE, NULL);
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
171 }
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
172 else
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
173 g_printerr(_("Your signaling implementation is broken.\n"
78a8b3095274 [svn] - do not use the signal handler at all on linuxthreads and hope for the best
nenolod
parents: 2665
diff changeset
174 "Expect unusable crash reports.\n"));
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
175 }