Changeset 324 for trunk/src/sh_sub.c


Ignore:
Timestamp:
Apr 4, 2011, 9:48:00 PM (14 years ago)
Author:
katerina
Message:

Fix for ticket #244: Timeout error in retry_lstat() not propagated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_sub.c

    r323 r324  
    453453  if (retval < 0)
    454454    {
     455      int error = errno;
    455456      sh_kill_sub();
     457      errno = error;
    456458      sflag = 1;
    457459      goto end;
     
    466468
    467469  do {
    468     retval = poll(&pfds, 1, 1000);
     470    retval = poll(&pfds, 1, 300 * 1000);
    469471  } while (retval < 0 && errno == EINTR);
    470472
     473#ifndef ETIMEDOUT
     474#define ETIMEDOUT EIO
     475#endif
     476
    471477  if (retval <= 0)
    472478    {
     479      int error = errno;
    473480      sh_kill_sub();
     481      errno = (retval == 0) ? ETIMEDOUT : error;
    474482      sflag = -1;
    475483      goto end;
     
    483491  if (retval < 0)
    484492    {
     493      int error = errno;
    485494      sh_kill_sub();
     495      errno = error;
    486496      sflag = 1;
    487497      goto end;
Note: See TracChangeset for help on using the changeset viewer.