dvbsrc: retry opening the frontend on EINTR
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Fri, 5 Sep 2014 17:58:19 +0000 (13:58 -0400)
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Sun, 7 Sep 2014 20:39:51 +0000 (17:39 -0300)
sys/dvb/gstdvbsrc.c

index 0ea0064..2ce42fd 100644 (file)
@@ -1462,8 +1462,9 @@ gst_dvbsrc_open_frontend (GstDvbSrc * object, gboolean writable)
   GST_INFO_OBJECT (object, "Using frontend device: %s", frontend_dev);
 
   /* open frontend */
-  if ((object->fd_frontend =
-          open (frontend_dev, writable ? O_RDWR : O_RDONLY)) < 0) {
+  LOOP_WHILE_EINTR (object->fd_frontend,
+      open (frontend_dev, writable ? O_RDWR : O_RDONLY));
+  if (object->fd_frontend < 0) {
     switch (errno) {
       case ENOENT:
         GST_ELEMENT_ERROR (object, RESOURCE, NOT_FOUND,