Shut down and reboot the system (QNX Neutrino)
phshutdown [options]
The default is 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 $PHOTON2_PATH/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.
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.
If you decide to shutdown or reboot the system, phshutdown adds a a line to the /var/log/wtmp if it already exists.
The phshutdown utility doesn't create /var/log/wtmp if it doesn't already exist. This file can quickly become very big, which isn't good on an embedded system with limited resources. |
Logging In, Logging Out, and Shutting Down in the Neutrino User's Guide