Change verbosity level of some messages
authorKonrad Kuchciak <k.kuchciak@samsung.com>
Fri, 28 Jun 2019 08:54:55 +0000 (10:54 +0200)
committerKonrad Kuchciak <k.kuchciak@samsung.com>
Fri, 28 Jun 2019 08:55:36 +0000 (10:55 +0200)
Change-Id: I4b81e99a3bed1d6dd4923aad9ec9e157acc3a010

src/process.c
src/stability-monitor.c
src/utils.c

index 7cbc858..ce70727 100644 (file)
@@ -157,8 +157,9 @@ static int process_get_exe(struct proc_info *process)
 
     ret = pid_to_basename(process->pid, buf);
     if (ret) {
-        _E("Unable to get process basename: %d", ret);
-        return -1;
+        if (ret != -EEXIST)
+            _E("pid_to_basename() failed, pid: %d, ret: %d", process->pid, ret);
+        return ret;
     }
 
     process->exe = strndup(buf, NAME_MAX);
index 3fe0f46..cb19625 100644 (file)
@@ -177,7 +177,11 @@ static gboolean run(gpointer data)
             /* Create process info */
             ret = process_create_info(rd_i->v[0], rd_i->v[1], &process);
             if (ret) {
-                _E("Unable to create process info: %d", ret);
+                if (ret == -EEXIST)
+                    _DD("Unable to create process info, it has just died\n");
+                else
+                    _E("Unable to create process info: %d", ret);
+
                 continue;
             }
         }
index 25cde1b..abb0114 100644 (file)
@@ -58,8 +58,8 @@ int pid_to_basename(int pid, char *basename)
     /* Readlink /proc/pid/exe */
     ret = readlink(link_name, path, PATH_MAX);
     if (ret <= 0) {
-        _E("readlink() failed, probably the process(%d) has just died: %d", pid, ret);
-        return -1;
+        _DD("readlink() failed, pid: %d, ret: %d\n", pid, ret);
+        return -EEXIST;
     }
 
     path[ret] = 0;