Differentiate emitting messages and logging trace messages
Use 'ps -p PID' to check if a pid is alive.

This is hopefully superior to 'kill -0' which fails if you are not
the user who is running the process.