[BACK]Return to atomicio.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/atomicio.c between version 1.29 and 1.30

version 1.29, 2019/01/23 08:01:46 version 1.30, 2019/01/24 02:42:23
Line 54 
Line 54 
                 res = (f) (fd, s + pos, n - pos);                  res = (f) (fd, s + pos, n - pos);
                 switch (res) {                  switch (res) {
                 case -1:                  case -1:
                         switch(errno) {                          if (errno == EINTR) {
                         case EINTR:  
                                 /* possible SIGALARM, update callback */                                  /* possible SIGALARM, update callback */
                                 if (cb != NULL && cb(cb_arg, 0) == -1) {                                  if (cb != NULL && cb(cb_arg, 0) == -1) {
                                         errno = EINTR;                                          errno = EINTR;
                                         return pos;                                          return pos;
                                 }                                  }
                                 continue;                                  continue;
                         case EAGAIN:                          } else if (errno == EAGAIN || errno == EWOULDBLOCK) {
                                 (void)poll(&pfd, 1, -1);                                  (void)poll(&pfd, 1, -1);
                                 continue;                                  continue;
                         }                          }
Line 113 
Line 112 
                 res = (f) (fd, iov, iovcnt);                  res = (f) (fd, iov, iovcnt);
                 switch (res) {                  switch (res) {
                 case -1:                  case -1:
                         switch(errno) {                          if (errno == EINTR) {
                         case EINTR:  
                                 /* possible SIGALARM, update callback */                                  /* possible SIGALARM, update callback */
                                 if (cb != NULL && cb(cb_arg, 0) == -1) {                                  if (cb != NULL && cb(cb_arg, 0) == -1) {
                                         errno = EINTR;                                          errno = EINTR;
                                         return pos;                                          return pos;
                                 }                                  }
                                 continue;                                  continue;
                         case EAGAIN:                          } else if (errno == EAGAIN || errno == EWOULDBLOCK) {
                                 (void)poll(&pfd, 1, -1);                                  (void)poll(&pfd, 1, -1);
                                 continue;                                  continue;
                         }                          }

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30