screenmirror : Set screenmirror thread name 26/292126/1
authorJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 27 Apr 2023 10:30:09 +0000 (19:30 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 27 Apr 2023 10:30:12 +0000 (19:30 +0900)
Change-Id: Id7fe72386707983c37abad1097661433cefca0f7
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/efl_util.c

index 6cb96d1..6eec154 100644 (file)
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#define _GNU_SOURCE
+
 #define LOG_TAG "TIZEN_N_EFL_UTIL"
 
 #include <efl_util.h>
@@ -2428,7 +2430,13 @@ efl_util_screenmirror_start(efl_util_screenmirror_h screenmirror)
 
    ret = pthread_create(&screenmirror->thread, NULL, _efl_util_screenmirror_loop, screenmirror);
    if (ret < 0)
-     fprintf(stderr, "[screenmirror] fail: thread create fail\n");
+     {
+        fprintf(stderr, "[screenmirror] fail: thread create fail\n");
+        _screenshot_mutex_unlock();
+        return EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL;
+     }
+
+   pthread_setname_np(screenmirror->thread, "e_util_mirror");
 
    _screenshot_mutex_unlock();