diff src/uicommon/gftpui.c @ 498:76c4e4cd108e

2004-7-12 Brian Masney <masneyb@gftp.org> * lib/sshv2.c - added sshv2_decode_file_attributes(). This is used by sshv2_get_next_file() and sshv2_get_file_size(). (sshv2_get_next_file_chunk) - if the error SSH_FX_FAILURE was returned, then do not return wrong message received from server to the user * lib/protocols.c (gftp_get_transfer_status) - when there is a transfer error, make sure that an incoming signal does not interrupt the timeout * src/gtk/gftp-gtk.c src/uicommon/gftpui.c - make sure the SIGCHLD signal handler reaps the zombies in the text port.
author masneyb
date Tue, 13 Jul 2004 02:44:35 +0000
parents 4376ffeab64e
children 39e9945288ea
line wrap: on
line diff
--- a/src/uicommon/gftpui.c	Tue Jul 13 01:35:15 2004 +0000
+++ b/src/uicommon/gftpui.c	Tue Jul 13 02:44:35 2004 +0000
@@ -122,7 +122,18 @@
 static RETSIGTYPE
 gftpui_common_sig_child (int signo)
 {
-  gftpui_common_child_process_done = 1;
+  int ret;
+
+  if (gftpui_common_child_process_done == -1)
+    {
+      /* Running from text port */
+      while (waitpid (-1, &ret, WNOHANG) > 0)
+        {
+          /* Nothing */
+        }
+    }
+  else
+    gftpui_common_child_process_done = 1;
 }
 
 
@@ -144,6 +155,7 @@
     exit (0);
 
   gftpui_common_logfunc = logfunc;
+  gftpui_common_child_process_done = -1;
 }