From: Gregor Jasny Date: Mon, 18 Jun 2012 17:01:34 +0000 (+0200) Subject: libdvbv5: Rewrite non portable select loop X-Git-Tag: v4l-utils-0.9.1~153 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=adf44ffc70303f648ae2908ec6c95d4ea4e51aea;p=platform%2Fupstream%2Fv4l-utils.git libdvbv5: Rewrite non portable select loop Signed-off-by: Gregor Jasny --- diff --git a/lib/libdvbv5/dvb-scan.c b/lib/libdvbv5/dvb-scan.c index e0a546c..f591f8e 100644 --- a/lib/libdvbv5/dvb-scan.c +++ b/lib/libdvbv5/dvb-scan.c @@ -298,6 +298,7 @@ static int poll(int filedes, unsigned int seconds) { fd_set set; struct timeval timeout; + int ret; /* Initialize the file descriptor set. */ FD_ZERO (&set); @@ -308,9 +309,10 @@ static int poll(int filedes, unsigned int seconds) timeout.tv_usec = 0; /* `select' returns 0 if timeout, 1 if input available, -1 if error. */ - return TEMP_FAILURE_RETRY (select (FD_SETSIZE, - &set, NULL, NULL, - &timeout)); + do ret = select (FD_SETSIZE, &set, NULL, NULL, &timeout); + while (ret == -1 && errno == EINTR); + + return ret; }