Changeset 171 for trunk/src/sh_tools.c


Ignore:
Timestamp:
Jul 8, 2008, 11:16:14 AM (16 years ago)
Author:
katerina
Message:

Include dnmalloc (ticket #108) and fix bugs #106 (EINPROGRESS) and #107 (compressBound).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_tools.c

    r170 r171  
    725725  struct  sigaction  new_act;
    726726  struct  sigaction  old_act;
    727 #if defined(WITH_TPT)
    728727  char    errbuf[SH_ERRBUF_SIZE];
    729 #endif
    730728
    731729  SL_ENTER(_("sh_write_select"));
     
    762760                continue;
    763761              }
    764             if ( errno == EINTR) /* try again */
     762            if ( errno == EINTR || errno == EINPROGRESS ) /* try again */
    765763              continue;
    766764            *w_error = errno;
    767             TPT(( 0, FIL__, __LINE__, _("msg=<select: %s>\n"),
    768                   sh_error_message(*w_error, errbuf, sizeof(errbuf))));
    769765            sigaction (SIGPIPE, &old_act, NULL);
     766            sh_error_message(*w_error, errbuf, sizeof(errbuf));
     767            sh_error_handle (SH_ERR_INFO, FIL__, __LINE__, errno, MSG_E_SUBGEN,
     768                             errbuf,
     769                             _("sh_write_select (ws)") );
     770            TPT(( 0, FIL__, __LINE__, _("msg=<select: %s>\n"), errbuf ));
    770771            SL_RETURN( countbytes, _("sh_write_select"));
    771772          }
     
    780781                continue;
    781782              }
    782             if ( errno == EINTR ) /* try again */
     783            if ( errno == EINTR || errno == EINPROGRESS ) /* try again */
    783784              continue;
    784785            *w_error = errno;
    785             TPT(( 0, FIL__, __LINE__, _("msg=<select: %s>\n"),
    786                   sh_error_message(*w_error, errbuf, sizeof(errbuf))));
    787786            sigaction (SIGPIPE, &old_act, NULL);
     787            sh_error_message(*w_error, errbuf, sizeof(errbuf));
     788            sh_error_handle (SH_ERR_INFO, FIL__, __LINE__, errno, MSG_E_SUBGEN,
     789                             errbuf,
     790                             _("sh_write_select (rs)") );
     791            TPT(( 0, FIL__, __LINE__, _("msg=<select: %s>\n"), errbuf ));
    788792            SL_RETURN( countbytes, _("sh_write_select"));
    789793          }
     
    836840            *w_error = errno;
    837841            sigaction (SIGPIPE, &old_act, NULL);
     842            sh_error_message(*w_error, errbuf, sizeof(errbuf));
     843            sh_error_handle (SH_ERR_INFO, FIL__, __LINE__, errno, MSG_E_SUBGEN,
     844                             errbuf,
     845                             (type == SH_DO_WRITE) ?
     846                             _("sh_write_select (w)") : _("sh_write_select (r)"));
    838847            TPT(( 0, FIL__, __LINE__, _("msg=<count < 0>\n")));
    839848            SL_RETURN( countbytes, _("sh_write_select"));
Note: See TracChangeset for help on using the changeset viewer.