duplicated lines in serverloop.c? (openssh252p2)

Sandor W. Sklar ssklar at stanford.edu
Tue Mar 27 06:23:32 EST 2001


Hi,

I was looking through the source, and I noticed that the following 
code appears twice in the file serverloop.c.  Is it supposed to, and 
if not, would there be any ill effect?

   +289
   +290          /* Read and buffer any available stdout data from the 
program. */
   +291          if (!fdout_eof && FD_ISSET(fdout, readset)) {
   +292                  len = read(fdout, buf, sizeof(buf));
   +293                  if (len < 0 && (errno == EINTR || errno == EAGAIN)) {
   +294                          /* do nothing */
   +295                  } else if (len <= 0) {
   +296                          fdout_eof = 1;
   +297                  } else {
   +298                          buffer_append(&stdout_buffer, buf, len);
   +299                          fdout_bytes += len;
   +300                  }
   +301          }
   +302          /* Read and buffer any available stderr data from the 
program. */
   +303          if (!fderr_eof && FD_ISSET(fderr, readset)) {
   +304                  len = read(fderr, buf, sizeof(buf));
   +305                  if (len < 0 && (errno == EINTR || errno == EAGAIN)) {
   +306                          /* do nothing */
   +307                  } else if (len <= 0) {
   +308                          fderr_eof = 1;
   +309                  } else {
   +310                          buffer_append(&stderr_buffer, buf, len);
   +311                  }
   +312          }

-- 
sandor w. sklar
unix systems administrator
stanford university itss-css




More information about the openssh-unix-dev mailing list