Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit d113cce

Browse files
prepare 2.1.2 release (#22)
1 parent bfcc5b9 commit d113cce

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/utility.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,19 @@ LDi_sleepMilliseconds(const unsigned long milliseconds)
8080
}
8181

8282
if ((status = usleep(usec)) != 0) {
83-
LD_LOG_1(LD_LOG_CRITICAL, "usleep failed with: %s",
84-
strerror(errno));
83+
if (errno == EINTR) {
84+
LD_LOG(LD_LOG_WARNING,
85+
"LDi_sleepMilliseconds usleep got EINTR skipping sleep");
8586

86-
LD_ASSERT(false);
87+
return false;
88+
} else {
89+
LD_LOG_1(LD_LOG_CRITICAL, "usleep failed with: %s",
90+
strerror(errno));
8791

88-
return false;
92+
LD_ASSERT(false);
93+
94+
return false;
95+
}
8996
}
9097

9198
return true;

0 commit comments

Comments
 (0)