2006-09-16 [colin] 2.4.0cvs192
authorColin Leroy <colin@colino.net>
Sat, 16 Sep 2006 13:28:20 +0000 (13:28 +0000)
committerColin Leroy <colin@colino.net>
Sat, 16 Sep 2006 13:28:20 +0000 (13:28 +0000)
* src/main.c
Revert part of 2.3.0cvs18, Saving caches on SIGPIPE,
as if the SIGPIPE comes from etpan's thread we could
trigger a GUI update from this thread.

ChangeLog
PATCHSETS
configure.ac
src/main.c

index 0c57e2bd035d7d94789a29c49fa1db06b9ed8535..2c1dcc9b6c319f479ea5ba805016dca7e9c7c0cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-16 [colin]     2.4.0cvs192
+
+       * src/main.c
+               Revert part of 2.3.0cvs18, Saving caches on SIGPIPE,
+               as if the SIGPIPE comes from etpan's thread we could
+               trigger a GUI update from this thread.
+
 2006-09-16 [colin]     2.4.0cvs191
 
        * src/summaryview.c
index a1578c7be5b1ff22ba70aa202cfa8198fa369487..a6a93b902d482c8bf8725841dc1d86965c0bcdce 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.249 -r 1.395.2.250 src/summaryview.c;  ) > 2.4.0cvs189.patchset
 ( cvs diff -u -r 1.61.2.52 -r 1.61.2.53 src/account.c;  ) > 2.4.0cvs190.patchset
 ( cvs diff -u -r 1.395.2.250 -r 1.395.2.251 src/summaryview.c;  ) > 2.4.0cvs191.patchset
+( cvs diff -u -r 1.115.2.103 -r 1.115.2.104 src/main.c;  ) > 2.4.0cvs192.patchset
index 32be95069f2b01a54d35c5c15a4d003ffe4e0243..1b9cd0db9c4af0398c89e687fb008349d9a16643 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=191
+EXTRA_VERSION=192
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 089739a022d8a06eefa966bb547d3c37b599e9c8..23bc361d8cde855ae331756ceb22c34e12ba0298 100644 (file)
@@ -532,6 +532,10 @@ int main(int argc, char *argv[])
 
        inc_autocheck_timer_init(mainwin);
 
+       /* ignore SIGPIPE signal for preventing sudden death of program */
+#ifdef G_OS_UNIX
+       signal(SIGPIPE, SIG_IGN);
+#endif
        if (cmd.online_mode == ONLINE_MODE_OFFLINE) {
                main_window_toggle_work_offline(mainwin, TRUE, FALSE);
        }
@@ -629,7 +633,6 @@ int main(int argc, char *argv[])
 
 static void save_all_caches(FolderItem *item, gpointer data)
 {
-       gint free_caches = GPOINTER_TO_INT(data);
        if (!item->cache) {
                return;
        }
@@ -637,10 +640,7 @@ static void save_all_caches(FolderItem *item, gpointer data)
        if (item->opened)
                folder_item_close(item);
        
-       if (free_caches)
-               folder_item_free_cache(item, TRUE);
-       else
-               folder_item_write_cache(item);
+       folder_item_free_cache(item, TRUE);
 }
 
 static gboolean sc_exiting = FALSE;
@@ -668,7 +668,7 @@ static void exit_sylpheed(MainWindow *mainwin)
 
        /* save all state before exiting */
        folder_write_list();
-       folder_func_to_all_folders(save_all_caches, GINT_TO_POINTER(1));
+       folder_func_to_all_folders(save_all_caches, NULL);
 
        main_window_get_size(mainwin);
        main_window_get_position(mainwin);
@@ -1295,15 +1295,6 @@ static void send_queue(void)
 
 static void quit_signal_handler(int sig)
 {
-#ifdef SIGPIPE
-       if (sig == SIGPIPE) {
-               debug_print("caugth SIGPIPE, maybe X closing!\n");
-               signal(SIGPIPE, SIG_IGN); /* ignore following sigpipes */
-               folder_write_list();
-               folder_func_to_all_folders(save_all_caches, GINT_TO_POINTER(0));
-               return; 
-       }
-#endif
        debug_print("Quitting on signal %d\n", sig);
 
        g_timeout_add(0, clean_quit, NULL);
@@ -1326,9 +1317,6 @@ static void install_basic_sighandlers()
 #ifdef SIGHUP
        sigaddset(&mask, SIGHUP);
 #endif
-#ifdef SIGPIPE
-       sigaddset(&mask, SIGPIPE);
-#endif
 
        act.sa_handler = quit_signal_handler;
        act.sa_mask    = mask;
@@ -1343,9 +1331,6 @@ static void install_basic_sighandlers()
 #ifdef SIGHUP
        sigaction(SIGHUP, &act, 0);
 #endif 
-#ifdef SIGPIPE
-       sigaction(SIGPIPE, &act, 0);
-#endif 
 
        sigprocmask(SIG_UNBLOCK, &mask, 0);
 #endif /* !G_OS_WIN32 */