Get the Computer into a Poweroff-mode

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 :frowning:
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.


You can walk the pid list in /proc and deliver your signals to them, ignore the pid entry that matches your own process.