Changeset 171 for trunk/src/sh_tools.c
- Timestamp:
- Jul 8, 2008, 11:16:14 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_tools.c
r170 r171 725 725 struct sigaction new_act; 726 726 struct sigaction old_act; 727 #if defined(WITH_TPT)728 727 char errbuf[SH_ERRBUF_SIZE]; 729 #endif730 728 731 729 SL_ENTER(_("sh_write_select")); … … 762 760 continue; 763 761 } 764 if ( errno == EINTR ) /* try again */762 if ( errno == EINTR || errno == EINPROGRESS ) /* try again */ 765 763 continue; 766 764 *w_error = errno; 767 TPT(( 0, FIL__, __LINE__, _("msg=<select: %s>\n"),768 sh_error_message(*w_error, errbuf, sizeof(errbuf))));769 765 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 )); 770 771 SL_RETURN( countbytes, _("sh_write_select")); 771 772 } … … 780 781 continue; 781 782 } 782 if ( errno == EINTR ) /* try again */783 if ( errno == EINTR || errno == EINPROGRESS ) /* try again */ 783 784 continue; 784 785 *w_error = errno; 785 TPT(( 0, FIL__, __LINE__, _("msg=<select: %s>\n"),786 sh_error_message(*w_error, errbuf, sizeof(errbuf))));787 786 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 )); 788 792 SL_RETURN( countbytes, _("sh_write_select")); 789 793 } … … 836 840 *w_error = errno; 837 841 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)")); 838 847 TPT(( 0, FIL__, __LINE__, _("msg=<count < 0>\n"))); 839 848 SL_RETURN( countbytes, _("sh_write_select"));
Note:
See TracChangeset
for help on using the changeset viewer.