Mercurial > audlegacy
comparison audacious/main.c @ 2066:4f750b8d0127 trunk
[svn] Do not install signal handler for SIGSEGV if environmental variable
AUD_ENSURE_BACKTRACE is defined.
In particular environment (maybe with glibc 2.5), core file through
signal handler does not contain application's backtrace but signal
handler's backtrace. :(
author | yaz |
---|---|
date | Thu, 07 Dec 2006 22:42:22 -0800 |
parents | f15664434382 |
children | c291952bf462 |
comparison
equal
deleted
inserted
replaced
2065:598564ddc4e9 | 2066:4f750b8d0127 |
---|---|
1074 | 1074 |
1075 if (options.no_log == FALSE) | 1075 if (options.no_log == FALSE) |
1076 bmp_setup_logger(); | 1076 bmp_setup_logger(); |
1077 | 1077 |
1078 signal(SIGPIPE, SIG_IGN); /* for controlsocket.c */ | 1078 signal(SIGPIPE, SIG_IGN); /* for controlsocket.c */ |
1079 signal(SIGSEGV, segfault_handler); | 1079 |
1080 /* in particular environment (maybe with glibc 2.5), core file | |
1081 through signal handler doesn't contain useful back trace. */ | |
1082 { | |
1083 char *magic; | |
1084 magic = getenv("AUD_ENSURE_BACKTRACE"); | |
1085 if(magic == NULL) | |
1086 signal(SIGSEGV, segfault_handler); | |
1087 } | |
1080 | 1088 |
1081 g_random_set_seed(time(NULL)); | 1089 g_random_set_seed(time(NULL)); |
1082 | 1090 |
1083 bmp_config_load(); | 1091 bmp_config_load(); |
1084 | 1092 |