proc_read_text
if (proc_read_text(pid, thread, item, buf, sizeof(buf)) < 0)
extern ssize_t proc_read_text(int pid, bool thread, const char *item, char *buf, size_t size);
len = proc_read_text(pid, 0, "stat", buf, sizeof(buf));