diff lib/protocols.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 7334a74db6f6
children 39e9945288ea
line wrap: on
line diff
--- a/lib/protocols.c	Tue Jul 13 01:35:15 2004 +0000
+++ b/lib/protocols.c	Tue Jul 13 02:44:35 2004 +0000
@@ -2723,10 +2723,10 @@
 int
 gftp_get_transfer_status (gftp_transfer * tdata, ssize_t num_read)
 {
-  int ret1, ret2;
   intptr_t retries, sleep_time;
   gftp_file * tempfle;
   struct timeval tv;
+  int ret1, ret2;
 
   ret1 = ret2 = 0;
   gftp_lookup_request_option (tdata->fromreq, "retries", &retries);
@@ -2783,7 +2783,12 @@
             {
               tv.tv_sec = sleep_time;
               tv.tv_usec = 0;
-              select (0, NULL, NULL, NULL, &tv);
+
+              do
+                {
+                  ret1 = select (0, NULL, NULL, NULL, &tv);
+                }
+              while (ret1 == -1 && errno == EINTR);
             }
           else
             tdata->conn_error_no_timeout = 0;