Shut down and reboot the system (QNX Neutrino)
phshutdown [options]
Neutrino
If no -S option is specified, the shutdown type is read from $HOME/.ph/phshutdown.cfg, if it exists. This file contains the shutdown type selected the last time phshutdown was used. If this file doesn't exist, phshutdown uses the default type of reboot.
In its default configuration, phshutdown allows any user to shut the system down. This makes it easy to use in a single-user desktop environment but is not desirable in a multi-user, networked configuration. If you want to make it more secure, restrict this shutdown privilege to root by simply creating a new file, like this:
$ touch /usr/photon/config/phshutdown.restrict
The presence of this file allows any user to end a Photon session, but prevents users who do not have the root password from shutting down or rebooting the machine.
If you are root, this restriction does not apply unless you pass the -i option with phshutdown. In this case, you are treated as a non-root user and will be asked for the root password before being allowed to shut the system down. Using this option always provides a secure shutdown dialog, even from phlogin, where it's always root that launches phshutdown.
This utility needs to have the setuid (“set user ID”) bit set in its permissions. If you use mkefs, mketfs, or mkifs on a Windows host to include this utility in an image, use the perms attribute to specify its permissions explicitly, and the uid and gid attributes to set the ownership correctly. |
The phshutdown utility displays a dialog of shutdown options:
If you choose to shut down the entire system, phshutdown does it in an orderly way by:
The ten-second interval allows processes that have elected to catch the SIGTERM signal to perform any cleanup they need to do before the system is rebooted.
Logging In, Logging Out, and Shutting Down in the QNX Neutrino User's Guide
shutdown_system() in the QNX Neutrino Library Reference