[Commits] [SCM] claws branch, master, updated. 3.17.3-33-gb249609

ticho at claws-mail.org ticho at claws-mail.org
Fri Jan 4 19:53:37 CET 2019


The branch, master has been updated
       via  b249609f1b0639c075f4089555cf31eaa82fa104 (commit)
      from  3390afd2245d5100c80ec5afc4d8233413edffbd (commit)

Summary of changes:
 src/action.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit b249609f1b0639c075f4089555cf31eaa82fa104
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Fri Jan 4 19:50:08 2019 +0100

    Make children tracking in execute_actions() more async-aware
    
    We need to update the children count in children->nb
    after starting each child process instead of after
    starting all of them, because we use that count
    in wait_for_children(), which is run asynchronously
    for each child.
    
    Fixes bug #3979: Hang (with killing needed) during
    action which extracts attachments

diff --git a/src/action.c b/src/action.c
index 37ce5ff..0996662 100644
--- a/src/action.c
+++ b/src/action.c
@@ -840,6 +840,7 @@ static gboolean execute_actions(gchar *action, GSList *msg_list,
 
 	children = g_new0(Children, 1);
 
+	children->nb          = 0;
 	children->action      = g_strdup(action);
 	children->action_type = action_type;
 	children->msg_text    = text;
@@ -883,6 +884,7 @@ static gboolean execute_actions(gchar *action, GSList *msg_list,
 						g_slist_append (NULL, msginfo);
 				children_list = g_slist_append(children_list,
 							       child_info);
+				children->nb++;
 			}
 			g_free(cmd);
 		}
@@ -896,6 +898,7 @@ static gboolean execute_actions(gchar *action, GSList *msg_list,
 						g_slist_copy (msg_list);
 				children_list = g_slist_append(children_list,
 								child_info);
+				children->nb++;
 			}
 			g_free(cmd);
 		} else
@@ -914,7 +917,6 @@ static gboolean execute_actions(gchar *action, GSList *msg_list,
 		GSList *cur;
 
 		children->list	      = children_list;
-		children->nb	      = g_slist_length(children_list);
 		children->initial_nb  = children->nb;
 
 		for (cur = children_list; cur; cur = cur->next) {
@@ -1094,6 +1096,7 @@ static gint wait_for_children(Children *children)
 		free_children(children);
 	} else if (!children->output) {
 		gtk_widget_destroy(children->dialog);
+		children->dialog = NULL;
 	}
 
 	return FALSE;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list