SERVICE(8)

NAME
service - Start or stop an operating system server or device driver.

SYNOPSIS

service up <service> [-args args] [-dev special] [-period ticks]

service down <pid>

service refresh <pid>

service rescue <dir>

service shutdown

DESCRIPTION

Tells the reincarnation server to start or stop a system service, such as a server or device driver. The device driver will be automatically restarted when it unexpectedly exits, e.g., if it is killed because of a bad pointer. Starting requires an absoluate path to the binary to be executed.

When an optional period is specified, the reincarnation server sends a status request to the system service after every period. If there the response does not arrive in time, the reincarnation server will kill the misbehaving process and restart a new one. The period must be specified in ticks, but can be appended with 'HZ' to make it seconds.

Stopping a system service requires the process id of a running system service. Issuing a kill command from the shell will not work, since the reincarnation server interprets this as an unexpected exit and will automatically restart a fresh copy of the process. The clean way to restart a process is using the

The rescue call can be used to set the current working directory of the reincarnation server. By using a trusted rescue driver to shadow certain binaries in RAM the reincarnation server can check that rescue directory for binaries if the normal execution of the absolute path fails. This allows recovery from failures of the root file system driver.

If the system is to be shutdown, the reincarnation server should know about this event to prevent it from restarting services that are killed during the shutdown sequence.

EXAMPLES

SEE ALSO

boot(8), monitor(8)