View topic - Get the Computer into a Poweroff-mode

Get the Computer into a Poweroff-mode

anything that doesn't fit to other groups.

Get the Computer into a Poweroff-mode

Postby robert » Fri Jul 11, 2003 7:49 am

Shutdown the system

Hola @ All,

i want to shutdown my system out of my own program.
that means i want to kill all processes but not my own process, and hold on my computer in a endless while with sleep().
Like "shutdown -fb"

exist there any funktion which do this?

I found the sysmgr_reboo() function but i dont know what they do, the source code of this function told me only thay they send a reboot-message to sysmgr, but is it an hard poweroff or an fine shutdown (kill all prcesses and turn power off then).


Unfortunately i doesnt have the source for the qnx shutdown-tool :(
In readed the docu to "shutdown", that this tool kill all porcesses which in /proc but which when?(from hi to low ?).
I need to my program for avoid the reboot, too.

bye
robert
Active Member
 
Posts: 15
Joined: Thu Aug 01, 2002 1:42 pm
Location: Germany

Postby cdm » Fri Jul 11, 2003 6:10 pm

You can walk the pid list in /proc and deliver your signals to them, ignore the pid entry that matches your own process.
cdm
QNX Master
 
Posts: 789
Joined: Fri Jul 05, 2002 9:38 am


Return to General Programming

Who is online

Users browsing this forum: No registered users and 2 guests