// /proc/<pid>/stat
if(unlikely(read_proc_pid_stat(p))) {
- error("Cannot process %s/proc/%d/stat (command '%s')", host_prefix, pid, p->comm);
+ if(errno != ENOENT || debug)
+ error("Cannot process %s/proc/%d/stat (command '%s')", host_prefix, pid, p->comm);
+ else
+ errno = 0;
// there is no reason to proceed if we cannot get its status
return;
}
// --------------------------------------------------------------------
// /proc/<pid>/io
- if(unlikely(read_proc_pid_io(p)))
- error("Cannot process %s/proc/%d/io (command '%s')", host_prefix, pid, p->comm);
+ if(unlikely(read_proc_pid_io(p))) {
+ if(errno != ENOENT || debug)
+ error("Cannot process %s/proc/%d/io (command '%s')", host_prefix, pid, p->comm);
+ else
+ errno = 0;
+ }
// --------------------------------------------------------------------
// /proc/<pid>/statm
if(unlikely(read_proc_pid_statm(p))) {
- error("Cannot process %s/proc/%d/statm (command '%s')", host_prefix, pid, p->comm);
+ if(errno != ENOENT || debug)
+ error("Cannot process %s/proc/%d/statm (command '%s')", host_prefix, pid, p->comm);
+ else
+ errno = 0;
// there is no reason to proceed if we cannot get its memory status
return;
}
if(unlikely(p->new_entry)) {
// /proc/<pid>/cmdline
if(likely(proc_pid_cmdline_is_needed)) {
- if(unlikely(read_proc_pid_cmdline(p)))
- error("Cannot process %s/proc/%d/cmdline (command '%s')", host_prefix, pid, p->comm);
+ if(unlikely(read_proc_pid_cmdline(p))) {
+ if(errno != ENOENT || debug)
+ error("Cannot process %s/proc/%d/cmdline (command '%s')", host_prefix, pid, p->comm);
+ else
+ errno = 0;
+ }
}
if(unlikely(debug))
// /proc/<pid>/fd
if(unlikely(read_pid_file_descriptors(p))) {
- error("Cannot process entries in %s/proc/%d/fd (command '%s')", host_prefix, pid, p->comm);
+ if(errno != ENOENT || debug)
+ error("Cannot process entries in %s/proc/%d/fd (command '%s')", host_prefix, pid, p->comm);
+ else
+ errno = 0;
}
// --------------------------------------------------------------------