Skip navigation.
Home
The QNX Community Portal

View topic - LookupPrivilegeValue in QNX

LookupPrivilegeValue in QNX

For discussion of realtime and/or embedded programming.

LookupPrivilegeValue in QNX

Postby anvesh » Thu Feb 25, 2010 10:04 am

Hi All,
I need to migrate some requirements from windows to QNX. As per one requirement process have privileges to shutdown,backup,restore entire system and windows code has used LookupPrivilegeValue API for granting privileges. My doubt are,

1. Is there any way in QNX to shutdown entire system using application.
2. Is there any equilivalent for windows specific API LookupPrivilegeValue in QNX.
anvesh
Active Member
 
Posts: 31
Joined: Wed Dec 03, 2008 6:57 am

RE: LookupPrivilegeValue in QNX

Postby maschoen » Sat Feb 27, 2010 7:16 pm

1. system("shutdown");

2. Check whether the process is root?
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

RE: LookupPrivilegeValue in QNX

Postby garyritu » Tue Mar 02, 2010 7:48 am

Thanks maschoen it worked and system rebooted after using this API.
garyritu
Active Member
 
Posts: 58
Joined: Fri May 22, 2009 7:09 am

RE: LookupPrivilegeValue in QNX

Postby maschoen » Tue Mar 02, 2010 4:17 pm

Just to be clear, system("shutdown") just runs a shell as in:

# sh shutdown

and shutdown is program that shuts the system down.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm


Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 4 guests