Check if the process is running as root user, for example, one started with sudo
Run a command using sudo, prompting the user with an OS dialog if necessary
Block users from running your app with root permissions
Try to downgrade the permissions of a process with root privileges and block access if it fails
Try to downgrade the permissions of a process with root privileges