Skip to content
Snippets Groups Projects
Commit 892b9b44 authored by sletz's avatar sletz
Browse files

Correct JackFifo::TimedWait for EINTR handling.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3560 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 7d284aec
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,10 @@ Paul Davis
Jackdmp changes log
---------------------------
2009-06-16 Stephane Letz <letz@grame.fr>
* Correct JackFifo::TimedWait for EINTR handling.
2009-06-05 Stephane Letz <letz@grame.fr>
* Correct jack_set_error_function, jack_set_info_function and jack_set_thread_creator functions.
......
......@@ -101,12 +101,16 @@ bool JackFifo::TimedWait(long usec)
// Does not work on OSX ??
bool JackFifo::TimedWait(long usec)
{
assert(fFifo >= 0);
if ((poll(&fPoll, 1, usec / 1000) < 0) && (errno != EINTR)) {
jack_error("JackFifo::TimedWait name = %s err = %s", fName, strerror(errno));
int res;
if (fFifo < 0) {
jack_error("JackFifo::TimedWait name = %s already desallocated!!", fName);
return false;
}
do {
res = poll(&fPoll, 1, usec / 1000);
} while (res < 0 && errno == EINTR);
if (fPoll.revents & POLLIN) {
return Wait();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment