Skip to content

Commit

Permalink
CommonAPI-SomeIP 3.1.11.4
Browse files Browse the repository at this point in the history
  • Loading branch information
juergengehring committed Apr 18, 2017
1 parent 337e799 commit c3acaae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Changes
=======
v3.1.11.4
- Fixed potential busy loop for mainloop applications

v3.1.11.3
- Fixed reading empty unions

Expand Down
16 changes: 12 additions & 4 deletions src/CommonAPI/SomeIP/Watch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,12 @@ void Watch::pushQueue(std::shared_ptr<QueueEntry> _queueEntry) {
}
}
#else
if(write(pipeFileDescriptors_[1], &pipeValue_, sizeof(pipeValue_)) == -1) {
std::perror(__func__);
while (write(pipeFileDescriptors_[1], &pipeValue_, sizeof(pipeValue_)) == -1) {
if (errno != EAGAIN && errno != EINTR) {
std::perror(__func__);
break;
}
std::this_thread::yield();
}
#endif
}
Expand All @@ -253,8 +257,12 @@ void Watch::popQueue() {
}
#else
int readValue = 0;
if(read(pipeFileDescriptors_[0], &readValue, sizeof(readValue)) == -1) {
std::perror(__func__);
while (read(pipeFileDescriptors_[0], &readValue, sizeof(readValue)) == -1) {
if (errno != EAGAIN && errno != EINTR) {
std::perror(__func__);
break;
}
std::this_thread::yield();
}
#endif

Expand Down

0 comments on commit c3acaae

Please sign in to comment.