1
.\" Do *not* edit this file; it was automatically generated by ej2man
2
.\" Look for a name.ej file with the same name as this filename
4
.\" Process this file with the following
5
.\" nroff -man -Tutf8 maradns.8 | tr '\020' ' '
7
.\" Last updated Sat Jan 29 13:55:11 2011
9
.TH DUENDE 8 "duende" "January 2003" "duende"
10
.\" We don't want hyphenation (it's too ugly)
11
.\" We also disable justification when using nroff
12
.\" Due to the way the -mandoc macro works, this needs to be placed
13
.\" after the .TH heading
17
.\" We need the following stuff so that we can have single quotes
18
.\" In both groff and other UNIX *roff processors
19
.if \n(.g .mso www.tmac
21
.if !\n(.g .if '\(aq'' .ds aq \'
25
duende - run a child process as a daemon
29
makes a given child process a daemon. The standard output
31
of the child process is logged via syslog() with a priority of
32
LOG_INFO (LOG_ALERT on FreeBSD systems).
36
(--pid=/path/to/file) child_process [ all subsequent arguments passed
42
is invoked, it spawns two processes. In addition to
43
spawning the daemonized child process,
46
which reads and logs the standard output of the daemonized process. The
47
parent process stays alive so as to monitor the daemonized process. If
48
the optional --pid argument is supplied,
51
it\(aqs PID to the file specified by the argument. It is an error to
53
the --pid argument without an equal sign and file name.
56
requires a blank directory named /etc/maradns/logger
59
Should the parent duende process a
62
will restart the child process. Should the
63
daemonized or logging process received an untrapped HUP signal or exit
67
will restart the process. Should the daemonized
69
process exit for any other reason,
72
process a TERM signal and exit.
74
parent process receive a TERM or INT signal,
77
children TERM signals, then exits.
79
The duende process must be started as the superuser; this is because
80
Duende\(aqs intended child processes (maradns, DwMain, and DwTcp) need
82
to privileged ports, and because
83
duende uses a setuid() call to change the user ID of the logging
85
to the user with ID 66.
89
uses the syslog() facility to log the standard output of the
90
program that it invokes. The name of the program (in other words, the
91
"ident" given to openlog()) is the full path of the first argument
95
All messages created by the child process are sent
96
to syslog() with a priority of LOG_INFO (LOG_ALERT on FreeBSD systems)
97
and a "facility" of LOG_DAEMON; should duende itself encounter an
99
it will send messages to syslog() with a priority of LOG_ALERT.
101
For example, suppose one invokes duende thusly:
104
duende /usr/local/sbin/DwMain
107
If invoked thusly, duende will log all messages with the "ident"
109
name) of "/usr/local/sbin/DwMain". If this is not desired, invoke
114
export PATH=$PATH:/usr/local/sbin
118
This will log messages with a (more sensible) "ident" of DwMain.
120
Note: If a non-POSIX Bourne shell (such as csh, es, rc, or fish) is
122
invoke DwMain, the above syntax needs to be changed.
124
Also, the directory /etc/maradns/logger, while used by duende, is not
126
to store any log messages. That is unless, for some reason, one
127
configures syslog to store messages there.
130
Using duende to start DwMain, where the configuration file is
134
duende DwMain -f /etc/dwood3rc.2
137
Using duende to start zoneserver, where the mararc file is
141
duende zoneserver -f /etc/mararc.4
147
assumes that all of its children are well-behaved, eating
148
their vegetables, going to bed when told, and terminating
149
when receiving a TERM signal.
150
.SH "LEGAL DISCLAIMER"
152
THIS SOFTWARE IS PROVIDED BY THE AUTHORS \(aq\(aqAS IS\(aq\(aq AND ANY
154
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
155
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
156
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
157
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
158
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
159
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
160
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
161
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
162
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
163
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
166
Duende and this man page are written by Sam Trenholme. D Richard Felker
167
III provided some invaluable assistance with the piping code which