cserve2: Check retrun of fcntl and print a message if we fail.
authorStefan Schmidt <s.schmidt@samsung.com>
Thu, 11 Sep 2014 10:30:19 +0000 (12:30 +0200)
committerStefan Schmidt <s.schmidt@samsung.com>
Thu, 11 Sep 2014 10:33:21 +0000 (12:33 +0200)
CID 1039707

src/lib/evas/cserve2/evas_cs2_client.c

index 981fcda4ffbd3f0e43c97fc041cd62b1e14193e2..2471c1f8e9c756bb3e9aba125332c99eb5e644f5 100644 (file)
@@ -185,7 +185,7 @@ _server_connect(void)
 #ifdef HAVE_FCNTL
    flags = fcntl(s, F_GETFD);
    flags |= FD_CLOEXEC;
-   fcntl(s, F_SETFD, flags);
+   if (fcntl(s, F_SETFD, flags) < 0) ERR("can't set CLOEXEC on fd");
 #endif
 
    remote.sun_family = AF_UNIX;