Prevent fix 38/17638/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Fri, 27 Sep 2013 07:10:11 +0000 (16:10 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 7 Mar 2014 07:51:42 +0000 (16:51 +0900)
Change-Id: I5de441d928ba44b1eba1abe1974990538b817f27

ism/src/scim_socket.cpp

index 6d10b44..753e103 100644 (file)
@@ -460,7 +460,12 @@ public:
 
             // Backup the current flag to restore after non-blocking connect() try
             int flags = fcntl (m_id, F_GETFL, 0);
-            fcntl (m_id, F_SETFL, flags | O_NONBLOCK);
+            if (fcntl (m_id, F_SETFL, flags | O_NONBLOCK) == -1) {
+                char buf[256] = {0};
+                snprintf (buf, sizeof (buf), "time:%ld  pid:%d  ppid:%d  %s  %s  fcntl() failed, %d\n",
+                    time (0), getpid (), getppid (), __FILE__, __func__, errno);
+                isf_save_log (buf);
+            }
 
             char buf[256] = {0};
             snprintf (buf, sizeof (buf), "time:%ld  pid:%d  ppid:%d  %s  %s  trying connect() to %s\n",