common: remove thread unsafe function 85/63485/2 accepted/tizen/ivi/20160324.131501 accepted/tizen/mobile/20160324.132645 accepted/tizen/tv/20160324.132543 accepted/tizen/wearable/20160324.132525 submit/tizen/20160324.084401
authorTaeyoung Kim <ty317.kim@samsung.com>
Thu, 24 Mar 2016 08:03:18 +0000 (17:03 +0900)
committerTaeyoung Kim <ty317.kim@samsung.com>
Thu, 24 Mar 2016 08:16:32 +0000 (17:16 +0900)
Change-Id: Icdf26e6f8921dec7b884de8a25277d0d4e42b1fc
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
src/crash-pipe/crash-pipe.c
src/shared/util.c

index d6ad0b5..a0b899a 100644 (file)
@@ -192,8 +192,8 @@ static int save_core(const char *core_path)
          for (n = 0, remaining = readb ; remaining > 0; remaining -= n) {
               n = write(fd, buf, remaining);
               if (n == -1) {
-                   syslog(LOG_ERR, "crash-pipe: Error while saving core file %s: %s. Removing core.\n",
-                          core_path, strerror(errno));
+                   syslog(LOG_ERR, "crash-pipe: Error while saving core file %s: %d. Removing core.\n",
+                          core_path, errno);
                    (void)unlink(core_path); // XXX check errors here too
                    goto out;
               }
index eed0476..776ab92 100644 (file)
@@ -84,7 +84,7 @@ int system_command_with_timeout(int timeout_seconds, char *command)
        pid_t pid = fork();
        /* handle error case */
        if (pid < 0) {
-               _E("fork: %s\n", strerror(errno));
+               _E("fork: %d\n", errno);
                return pid;
        }
        /* handle child case */
@@ -309,7 +309,7 @@ static int remove_dir_internal(int fd)
                                continue;
                        subfd = openat(fd, de->d_name, O_RDONLY | O_DIRECTORY);
                        if (subfd < 0) {
-                               _SE("Couldn't openat %s: %s\n", de->d_name, strerror(errno));
+                               _SE("Couldn't openat %s: %d\n", de->d_name, errno);
                                ret = -1;
                                continue;
                        }