[linux] How to check if a process is in hang state (Linux)