Actions: Fixed bug #622275 and made actions' output be displayed live
authorMelvin Hadasht <melvin.hadasht@free.fr>
Fri, 18 Oct 2002 13:55:11 +0000 (13:55 +0000)
committerMelvin Hadasht <melvin.hadasht@free.fr>
Fri, 18 Oct 2002 13:55:11 +0000 (13:55 +0000)
ChangeLog.claws
TODO.claws
configure.in
src/prefs_actions.c

index 35759d2..1d4f86f 100644 (file)
@@ -1,3 +1,10 @@
+2002-10-18 [melvin]    0.8.5claws45
+
+       * src/prefs_actions.c
+               Fixed bug #622275 where asynchroneous actions left 
+               zombies processes
+               Made (synchroneous) actions' input be displayed live.
+
 2002-10-18 [christoph] 0.8.5claws44
 
        * src/textview.c
index 5d53ee7..77d34e2 100644 (file)
@@ -55,5 +55,3 @@ win32 0.8.0claws+
                - allow dictionaries in non standard path
                - make dictionary menu use menu factory to support 
                accelerators that are remembered across Sylpheed sessions
-       o Fix bug in Actions where "&" actions will leave a zombie Sylpheed
-       processes
index ff76bd0..9e42fda 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws44
+EXTRA_VERSION=claws45
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index a2cf0cb..6fdc898 100644 (file)
@@ -1324,11 +1324,10 @@ ChildInfo *fork_child(gchar *cmd, gint action_type, GtkWidget *text,
                                close(chld_err[1]);
                                close(chld_status[0]);
                        }
-
-                       debug_print("Child: Waiting for grandchild\n");
-                       waitpid(gch_pid, NULL, 0);
-                       debug_print("Child: grandchild ended\n");
                        if (sync) {
+                               debug_print("Child: Waiting for grandchild\n");
+                               waitpid(gch_pid, NULL, 0);
+                               debug_print("Child: grandchild ended\n");
                                write(chld_status[1], "0\n", 2);
                                close(chld_status[1]);
                        }
@@ -1343,8 +1342,10 @@ ChildInfo *fork_child(gchar *cmd, gint action_type, GtkWidget *text,
 
        /* Parent */
 
-       if (!sync)
+       if (!sync) {
+               waitpid(pid, NULL, 0);
                return NULL;
+       }
 
        close(chld_in[0]);
        if (!(action_type & (ACTION_PIPE_IN | ACTION_OPEN_IN | ACTION_HIDE_IN)))
@@ -1764,4 +1765,5 @@ static void catch_output(gpointer data, gint source, GdkInputCondition cond)
                if (c > 0)
                        child_info->new_out = TRUE;
        }
+       wait_for_children(child_info->children);
 }