comparison pidgin/gtkmain.c @ 30677:810a6be1920f

merged from im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 07 Jul 2010 17:52:44 +0900
parents f30a02140f74
children db41f73ac3b6
comparison
equal deleted inserted replaced
30646:76b2a2636c62 30677:810a6be1920f
95 * Lists of signals we wish to catch and those we wish to ignore. 95 * Lists of signals we wish to catch and those we wish to ignore.
96 * Each list terminated with -1 96 * Each list terminated with -1
97 */ 97 */
98 static const int catch_sig_list[] = { 98 static const int catch_sig_list[] = {
99 SIGSEGV, 99 SIGSEGV,
100 SIGHUP,
101 SIGINT, 100 SIGINT,
102 SIGTERM, 101 SIGTERM,
103 SIGQUIT, 102 SIGQUIT,
104 SIGCHLD, 103 SIGCHLD,
105 #if defined(USE_GSTREAMER) && !defined(GST_CAN_DISABLE_FORKING) 104 #if defined(USE_GSTREAMER) && !defined(GST_CAN_DISABLE_FORKING)
221 purple_core_quit(); 220 purple_core_quit();
222 return FALSE; 221 return FALSE;
223 } 222 }
224 223
225 switch (sig) { 224 switch (sig) {
226 case SIGHUP:
227 purple_debug_warning("sighandler", "Caught signal %d\n", sig);
228 break;
229 #if defined(USE_GSTREAMER) && !defined(GST_CAN_DISABLE_FORKING) 225 #if defined(USE_GSTREAMER) && !defined(GST_CAN_DISABLE_FORKING)
230 /* By default, gstreamer forks when you initialize it, and waitpids for the 226 /* By default, gstreamer forks when you initialize it, and waitpids for the
231 * child. But if libpurple reaps the child rather than leaving it to 227 * child. But if libpurple reaps the child rather than leaving it to
232 * gstreamer, gstreamer's initialization fails. So, we wait a second before 228 * gstreamer, gstreamer's initialization fails. So, we wait a second before
233 * reaping child processes, to give gst a chance to reap it if it wants to. 229 * reaping child processes, to give gst a chance to reap it if it wants to.
548 int opt; 544 int opt;
549 gboolean gui_check; 545 gboolean gui_check;
550 gboolean debug_enabled; 546 gboolean debug_enabled;
551 gboolean migration_failed = FALSE; 547 gboolean migration_failed = FALSE;
552 GList *active_accounts; 548 GList *active_accounts;
549 struct stat st;
553 550
554 struct option long_options[] = { 551 struct option long_options[] = {
555 {"config", required_argument, NULL, 'c'}, 552 {"config", required_argument, NULL, 'c'},
556 {"debug", no_argument, NULL, 'd'}, 553 {"debug", no_argument, NULL, 'd'},
557 {"force-online", no_argument, NULL, 'd'}, 554 {"force-online", no_argument, NULL, 'd'},
851 /* 848 /*
852 * Set plugin search directories. Give priority to the plugins 849 * Set plugin search directories. Give priority to the plugins
853 * in user's home directory. 850 * in user's home directory.
854 */ 851 */
855 search_path = g_build_filename(purple_user_dir(), "plugins", NULL); 852 search_path = g_build_filename(purple_user_dir(), "plugins", NULL);
853 if (!g_stat(search_path, &st))
854 g_mkdir(search_path, S_IRUSR | S_IWUSR | S_IXUSR);
856 purple_plugins_add_search_path(search_path); 855 purple_plugins_add_search_path(search_path);
857 g_free(search_path); 856 g_free(search_path);
858 purple_plugins_add_search_path(LIBDIR); 857 purple_plugins_add_search_path(LIBDIR);
859 858
860 if (!purple_core_init(PIDGIN_UI)) { 859 if (!purple_core_init(PIDGIN_UI)) {