342 |
|
|
343 |
void (*fatal_error_signal_hook) P_ ((void)); |
void (*fatal_error_signal_hook) P_ ((void)); |
344 |
|
|
345 |
|
#ifdef HAVE_GTK_AND_PTHREAD |
346 |
|
/* When compiled with GTK and running under Gnome, multiple threads meay be |
347 |
|
created. Keep track of our main thread to make sure signals are delivered |
348 |
|
to it (see syssignal.h). */ |
349 |
|
|
350 |
|
pthread_t main_thread; |
351 |
|
#endif |
352 |
|
|
353 |
|
|
354 |
#ifdef SIGUSR1 |
#ifdef SIGUSR1 |
355 |
SIGTYPE |
SIGTYPE |
358 |
{ |
{ |
359 |
struct input_event buf; |
struct input_event buf; |
360 |
|
|
361 |
|
SIGNAL_THREAD_CHECK (sig); |
362 |
bzero (&buf, sizeof buf); |
bzero (&buf, sizeof buf); |
363 |
buf.kind = USER_SIGNAL_EVENT; |
buf.kind = USER_SIGNAL_EVENT; |
364 |
buf.frame_or_window = selected_frame; |
buf.frame_or_window = selected_frame; |
374 |
{ |
{ |
375 |
struct input_event buf; |
struct input_event buf; |
376 |
|
|
377 |
|
SIGNAL_THREAD_CHECK (sig); |
378 |
bzero (&buf, sizeof buf); |
bzero (&buf, sizeof buf); |
379 |
buf.kind = USER_SIGNAL_EVENT; |
buf.kind = USER_SIGNAL_EVENT; |
380 |
buf.code = 1; |
buf.code = 1; |
389 |
fatal_error_signal (sig) |
fatal_error_signal (sig) |
390 |
int sig; |
int sig; |
391 |
{ |
{ |
392 |
|
SIGNAL_THREAD_CHECK (sig); |
393 |
fatal_error_code = sig; |
fatal_error_code = sig; |
394 |
signal (sig, SIG_DFL); |
signal (sig, SIG_DFL); |
395 |
|
|
429 |
int sig; |
int sig; |
430 |
{ |
{ |
431 |
signal (sig, memory_warning_signal); |
signal (sig, memory_warning_signal); |
432 |
|
SIGNAL_THREAD_CHECK (sig); |
433 |
|
|
434 |
malloc_warning ("Operating system warns that virtual memory is running low.\n"); |
malloc_warning ("Operating system warns that virtual memory is running low.\n"); |
435 |
|
|
1041 |
# endif /* not SYNC_INPUT */ |
# endif /* not SYNC_INPUT */ |
1042 |
#endif /* not SYSTEM_MALLOC */ |
#endif /* not SYSTEM_MALLOC */ |
1043 |
|
|
1044 |
|
#ifdef HAVE_GTK_AND_PTHREAD |
1045 |
|
main_thread = pthread_self (); |
1046 |
|
#endif /* HAVE_GTK_AND_PTHREAD */ |
1047 |
|
|
1048 |
#if defined (MSDOS) || defined (WINDOWSNT) |
#if defined (MSDOS) || defined (WINDOWSNT) |
1049 |
/* We do all file input/output as binary files. When we need to translate |
/* We do all file input/output as binary files. When we need to translate |
1050 |
newlines, we do that manually. */ |
newlines, we do that manually. */ |