Skip to main content

parse_stat

Function parse_stat 

Source
pub fn parse_stat(buf: &[u8]) -> Option<(u32, CommBuf, StatFields)>
Expand description

Parse /proc/<pid>/stat.

Returns None when the buffer is malformed. Note the trap: comm may contain spaces, ( and ), so we anchor on the last ).