I want to check if a specific process is running in privileged mode. If a process is running is privileged mode, necessarily the user running it is going to be root?
I've noticed that when I use sudo, the process created will be associated to root instead of the current user, like in the output of the following command (it outputs "root"):
sudo sleep 10 & ps aux | grep sl[e]ep | cut -d' ' -f1
I know how to check if a process is being run by root, but I'm not sure if a process runs in privileged mode if, and only if, the user running it is root.