From: ulgal-park Date: Thu, 16 Dec 2021 08:29:36 +0000 (+0900) Subject: debug: fix printing error msg to use strerror_r() for thread safety X-Git-Tag: submit/tizen_6.5/20210604.124333~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e52961025e9fd9c0f35fee8edc12a9af981afb57;p=platform%2Fcore%2Fuifw%2Fheadless-server.git debug: fix printing error msg to use strerror_r() for thread safety Change-Id: I337a002d274cd9eed971c58a086ecbce88f1b8d3 --- diff --git a/src/debug/debug.c b/src/debug/debug.c index a6761b7..5fc6d58 100644 --- a/src/debug/debug.c +++ b/src/debug/debug.c @@ -192,7 +192,7 @@ _headless_debug_redir_stdout(headless_debug_t *hdebug, void *data) fd = open("/run/pepper/stdout.txt", O_CREAT | O_WRONLY | O_APPEND, S_IWUSR | S_IWGRP); if (fd < 0) { - PEPPER_TRACE("Failed to open stdout.txt (errno=%s)\n", strerror(errno)); + PEPPER_TRACE("Failed to open stdout.txt (errno=%m)\n"); return; } @@ -215,7 +215,7 @@ _headless_debug_redir_stderr(headless_debug_t *hdebug, void *data) fd = open("/run/pepper/stderr.txt", O_CREAT | O_WRONLY | O_APPEND, S_IWUSR | S_IWGRP); if (fd < 0) { - PEPPER_TRACE("Failed to open stderr.txt (errno=%s)\n", strerror(errno)); + PEPPER_TRACE("Failed to open stderr.txt (errno=%m)\n"); return; }