stefan pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=98457f7332383c2c8fbe604c64f6e0b8cb12fd12

commit 98457f7332383c2c8fbe604c64f6e0b8cb12fd12
Author: Stefan Schmidt <[email protected]>
Date:   Fri Sep 19 11:25:59 2014 +0200

    modules/mixer: Check fcntl setting CLOEXEC for success
    
    We still keep going if this fails but print out an error.
    
    CID: 1039960
---
 src/modules/mixer/pa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/mixer/pa.c b/src/modules/mixer/pa.c
index 8d30e4b..bf34059 100644
--- a/src/modules/mixer/pa.c
+++ b/src/modules/mixer/pa.c
@@ -377,7 +377,7 @@ con(Pulse *conn, int type __UNUSED__, 
Ecore_Con_Event_Server_Add *ev)
 
    flags = fcntl(conn->fd, F_GETFD);
    flags |= FD_CLOEXEC;
-   fcntl(conn->fd, F_SETFD, flags);
+   if (fcntl(conn->fd, F_SETFD, flags) < 0) ERR("Cannot set CLOEXEC on fd");
 
    conn->fdh = ecore_main_fd_handler_add(conn->fd, ECORE_FD_WRITE, 
(Ecore_Fd_Cb)fdh_func, conn, NULL, NULL);
    ecore_con_server_del(conn->svr);

-- 


Reply via email to