bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: :ext: with ssh failure on w2k - patch


From: Frank Hemer
Subject: Re: :ext: with ssh failure on w2k - patch
Date: Wed, 16 Feb 2005 18:18:28 +0100
User-agent: KMail/1.5.1

It seems I have tracked down the failure -
Find below a patch that fixes this issue:

Frank

Index: buffer.c
===================================================================
RCS file: /cvs/ccvs/src/buffer.c,v
retrieving revision 1.53
diff -u -r1.53 buffer.c
--- buffer.c    9 Dec 2004 22:59:38 -0000       1.53
+++ buffer.c    16 Feb 2005 17:14:03 -0000
@@ -1840,19 +1840,22 @@
        FD_SET (fb->fd, &readfds);
        do
        {
-           int numfds;
+           if (!fb->blocking)
+           {
+               int numfds;

-           do {
-               /* This used to select on exceptions too, but as far
-                  as I know there was never any reason to do that and
-                  SCO doesn't let you select on exceptions on pipes.  */
-               numfds = select (fb->fd + 1, &readfds, NULL, NULL, NULL);
-               if (numfds < 0 && errno != EINTR)
-               {
-                   status = errno;
-                   goto block_done;
-               }
-           } while (numfds < 0);
+               do {
+                   /* This used to select on exceptions too, but as far
+                      as I know there was never any reason to do that and
+                      SCO doesn't let you select on exceptions on pipes.  */
+                   numfds = select (fb->fd + 1, &readfds, NULL, NULL, NULL);
+                   if (numfds < 0 && errno != EINTR)
+                   {
+                       status = errno;
+                       goto block_done;
+                   }
+               } while (numfds < 0);
+           }

            nbytes = read (fb->fd, data + *got, size - *got);

@@ -2040,9 +2043,8 @@
            return errno;
        }
     }
-# endif /* F_GETFL && O_NONBLOCK && F_SETFL */
-
     fb->blocking = block;
+# endif /* F_GETFL && O_NONBLOCK && F_SETFL */

     return 0;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]