[Previous] [Contents] [Next]

shutdown

Shut down and reboot the system (QNX)

Syntax:

shutdown [-f] [-n node]

Options:

-f
Shut down fast. Send a SIGPWR signal, but wait only one second before rebooting.
-n node
Shut down the specified node (default is current node).

Description:

The shutdown utility performs an orderly system shutdown. This consists of first causing a SIGPWR to be sent to all processes, waiting for ten seconds, shutting down the filesystem, then performing a reboot of the system. The ten-second interval allows processes that have elected to catch the SIGPWR signal to perform any cleanup they need to do before the system is rebooted.

The shutdown utility sends messages to the Proc manager to accomplish both the sending of SIGPWR to all processes and the rebooting of the system. Some PC motherboards have problems with the standard methods of performing soft-reboots. If the system hangs after the ten-second countdown instead of rebooting, look at the options to the Proc manager to see if your version of Proc has an option to use an alternate method of soft-rebooting the system (if so you would have to add this to the invocation of Proc in the OS build-file -- see buildqnx).

Recent versions of shutdown (QNX 4.25 and later) send a SIGTERM to Fsys after the SIGPWR and ten-second wait. After issuing the SIGTERM, shutdown waits for Fsys to terminate before proceeding to either reboot or indicate that it is safe to reboot. Early versions of the filesystem would terminate immediately upon receipt of SIGTERM, while more recent versions (QNX 4.25 and later) will perform an orderly shutdown of the filesystem. In 99% of the cases, the filesystem will already be idle when the SIGTERM is issued. However, using up-to-date versions of shutdown and Fsys will provide greater assurance that the filesystem was indeed idle before the system was rebooted.


Note: You must be root to use shutdown.

See also:

Proc

Installation & Configuration


[Previous] [Contents] [Next]