ecore pipe - fix checking return of read for pipes in new code
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Tue, 18 Apr 2017 05:30:22 +0000 (14:30 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Tue, 18 Apr 2017 05:30:22 +0000 (14:30 +0900)
src/lib/ecore/ecore_pipe.c

index cab04b6..e9eca08 100644 (file)
@@ -608,7 +608,9 @@ _ecore_pipe_wait(Ecore_Pipe *p,
 
              if ((fd_timer_found) && (p->timerfd != PIPE_FD_INVALID))
                {
-                  pipe_read(p->timerfd, &timerfdbuf, sizeof(timerfdbuf));
+                  if (pipe_read(p->timerfd, &timerfdbuf, sizeof(timerfdbuf))
+                      < sizeof(timerfdbuf))
+                    WRN("Could not read timerfd data");
                   _ecore_pipe_unhandle(p);
                   break;
                }