How can a program know whether it is running in superuser mode?

new topic     » topic index » view thread      » older message » newer message

I want to do something like this.

if (program is not run in superuser mode) then 
 puts(1, "This program needs to be run in superuser mode.\n") 
 puts(1, "On Ubuntu, type 'sudo ' \n") 
end if 

How can a Euphoria program running on Linux know whether it is running in superuser mode? There doesn't seem to be any way to solve this problem with command_line().

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu