From 98457f7332383c2c8fbe604c64f6e0b8cb12fd12 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 19 Sep 2014 11:25:59 +0200 Subject: [PATCH] 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 8d30e4b81..bf3405937 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);