Improving Dimitrios solution for 2330
We need to freeze the process before running any checks on it.
If we don't, then we risk a race condition because the process
might disappear while we run the checks and a new process might
appear with the same PID.