#include <sys/reboot.h>
void reboot (HowTo, Argument) int HowTo; void *Argument;
The reboot subroutine restarts or re-initial program loads (IPL) the system. The startup is automatic and brings up /unix in the normal, nonmaintenance mode.
The calling process must have root user authority in order to run this subroutine successfully.
Attention: Users of the reboot subroutine are not portable. The reboot subroutine is intended for use only by the halt, reboot, and shutdown commands.
Argument | Specifies the amount of time (in seconds) to wait between turning the power off and turning the power on. This option is not supported on all models. Please consult your hardware technical reference for more details. |
Upon successful completion, the reboot subroutine does not return a value. If the reboot subroutine fails, a value of -1 is returned and the errno global variable is set to indicate the error.
The reboot subroutine is unsuccessful if any of the following is true:
EPERM | The calling process does not have root user authority. |
EINVAL | The HowTo value is not valid. |
EFAULT | The Argument value is not a valid address. |
This subroutine is part of Base Operating System (BOS) Runtime.
The halt command, reboot command, shutdown command.