DAEMONTAB(5) COMMAND REFERENCE DAEMONTAB(5)
NAME
daemontab - daemon process description file
DESCRIPTION
The file /etc/daemontab is used by the command /etc/daemon
to find the names of daemon programs, such as spoolers and
network communication programs.
The daemontab file may contain lines of three types. The
first type is a comment, which is any line that begins with
the character `#'. These lines are ignored by daemon.
The next type of line is read directly by daemon and is of
the form:
[ -Ksig ] [ -Ysig ] [ -wtime ] path [ args ]
The -K option is used to specify the default signal to be
used to kill the program. The signal may either be a number
or a word as listed by the command kill -l. The -Y option
is used to specify the default signal to be used to
synchronize the program. The signal may either be a number
or a word as listed by the command kill -l. The -w option
is used to specify the default time to wait after attempting
to kill a process before checking to see whether the process
was really killed or not. The path is the full pathname of
the program, and the args are the arguments to the command.
For example, the line
-YHUP -K2 -w10 /etc/foo_daemon -l -t15
specifies that /etc/foodaemon is a daemon (at least when
run with the options -l and -t15) and is to be killed with
the signal 2 (or interrupt). A successful kill will take up
to 10 seconds to be reflected by the system; the program is
to be synchronized with the signal HUP (or signal 1), and if
it is dead 10 seconds after the synchonization is attempted,
there is something wrong. It is important to note that the
lines:
-K3 /etc/foo_daemon
-YHUP -w5 /etc/foo_daemon -l
-K2 -w10 /etc/foo_daemon -t15
all differ, both from one another and from the first
example. The command and its arguments together specify a
Printed 10/17/86 1
DAEMONTAB(5) COMMAND REFERENCE DAEMONTAB(5)
distinct program invocation. Spaces and tabs are not
significant, and are reduced to a single space.
The third type of line in the daemontab file begins and ends
with the backquote character (`). This type of line is
executed by daemon via popen(3s), and the output from the
execution is taken as a list of program names as if they
were listed in the daemontab file. This feature makes it
possible to start different daemons depending on the state
of the system. For example, your system may have a package
which requires one daemon to be running if one peripheral is
hooked up, and a different daemon otherwise. The line:
`/usr/pkg/which_daemon`
would cause daemon to execute the command
/usr/pkg/whichdaemon and use the output as the name of the
daemon that should be running. This is similar to executing
the command
/etc/daemon [ options ] `/usr/pkg/which_daemon`
since the shell performs the same action with backquoted
commands (watch out for shells which turn newlines into
spaces).
FILES
/etc/daemontab The daemon process description
file.
CAVEATS
It is very important to realize that any user can execute
the command daemon, even if only the superuser can actually
perform any actions on the programs. Therefore, you must be
very careful to make sure that the commands which appear in
backquotes do not do anything other than print the names of
daemons.
There is no way to specify the default signal or wait time
with this type of line. Otherwise, the lines produced are
interpreted the same as with program names directly
specified in the daemontab file.
All lines in /etc/daemontab are limited to 1024 characters
in length. Also, output from backquoted commands is limited
to 1024 characters.
Printed 10/17/86 2
DAEMONTAB(5) COMMAND REFERENCE DAEMONTAB(5)
SEE ALSO
sh(1sh), kill(1), ps(1), popen(3s), daemon(8).
Printed 10/17/86 3
%%index%%
na:72,79;
de:151,2590;2885,1589;
fi:4474,158;
ca:4632,804;
se:5580,207;
%%index%%000000000105