snprintf(filename, sizeof(filename), "/proc/%li/stat", pid);
snprintf(filename, sizeof(filename), "/proc/%li/stat", pid);
/* The name of the process is enclosed in parens. Since the name can
* contain parens itself, spaces, numbers and pretty much everything
/* The name of the process is enclosed in parens. Since the name can
* contain parens itself, spaces, numbers and pretty much everything
snprintf(path, sizeof(path), "/proc/%li/psinfo", pid);
snprintf(path, sizeof(path), "/proc/%li/psinfo", pid);
if ((status < 0) || (((size_t)status) != sizeof(info))) {
ERROR("processes plugin: Unexpected return value "
"while reading \"%s\": "
if ((status < 0) || (((size_t)status) != sizeof(info))) {
ERROR("processes plugin: Unexpected return value "
"while reading \"%s\": "