ecore-pipe - check fcntl return
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 27 Aug 2014 06:17:00 +0000 (15:17 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 27 Aug 2014 06:17:00 +0000 (15:17 +0900)
fix CID 1039703

src/lib/ecore/ecore_pipe.c

index 7228abf958f0d225da4b87abe8e8bac2410a8f0c..23b80d15bda3f5ca511978197acdb2383731e85c 100644 (file)
@@ -378,7 +378,7 @@ ecore_pipe_full_add(Ecore_Pipe_Cb handler,
    if (!write_survive_fork)
      _ecore_fd_close_on_exec(fd_write);
 
-   fcntl(p->fd_read, F_SETFL, O_NONBLOCK);
+   if (fcntl(p->fd_read, F_SETFL, O_NONBLOCK) < 0) ERR("can't set pipe to NONBLOCK");
    p->fd_handler = ecore_main_fd_handler_add(p->fd_read,
                                              ECORE_FD_READ,
                                              _ecore_pipe_read,