Skip to content

Commit

Permalink
Correction for Issue #589
Browse files Browse the repository at this point in the history
usleep() should not be retried when rc!=0, and only issue HHC00075E
when errno!=EINTR.  This approach may be improved upon alltogether
by replacing the usleep() call in herc_usleep with nanosleep().
  • Loading branch information
Peter-J-Jansen committed Aug 8, 2023
1 parent c962c5d commit bf1a5d7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions hscutl.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,13 +609,9 @@ DLL_EXPORT int herc_usleep( useconds_t usecs, const char* file, int line )
{
int rc, save_errno;

while (1
if (1
&& (rc = usleep( usecs )) != 0
&& (save_errno = errno) == EINTR
)
continue;

if (rc != 0)
&& (save_errno = errno) != EINTR)
{
char fnc[128], msg[128];

Expand Down

0 comments on commit bf1a5d7

Please sign in to comment.