Check if process is running before trying to execute command and displaying list

A small patch to clear the process list buffer of processes no longer running.