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 35759d2fef070450e94b904c92c8e8aefe242a5f..1d4f86f7f4c378d44d02393c3bd1387e1f155cec 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 5d53ee777ea179add5f52f350ea3c1df7878c8f8..77d34e2ec769811c92b9ab1bd8975cce127afb60 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 ff76bd057446566f5ebff58d3184a913b80df80d..9e42fda56fe2fc351ec2b8ac94c5f6220d098ddb 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 a2cf0cb95e60fb107a771b02ae3a9766cec6f871..6fdc8986f2bc0771a62409c1ba36edd5f35d1cb5 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);
 }