logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

duende - run a child process as a daemon

Author

       Duende and this man page are written by Sam Trenholme. D Richard  Felker  III  provided  some  invaluable
       assistance with the piping code which duende uses.

January 2003                                         duende                                            DUENDE(8)

Bugs

Duende assumes that all of its children are well-behaved, eating their  vegetables,  going  to  bed  when
       told, and terminating when receiving a TERM signal.

Description

duende makes a given child process a daemon. The standard output and standard error of the child process
       is logged via syslog() with a priority of LOG_ALERT.

Details

       When duende is invoked, it spawns two processes. In addition to spawning the daemonized child process,
       duende also spawns a process which reads and logs the standard output of the daemonized process. The
       parent process stays alive so as to monitor the daemonized process.

       duende requires a blank directory named /etc/maradns/logger to run.

       Should the parent duende process a HUP signal, duende will restart the child process. Should the
       daemonized or logging process received an untrapped HUP signal or exit with an exit code of 8, duende
       will restart the process. Should the daemonized or logging process exit for any other reason, duende will
       send the logger process a TERM signal and exit.  Should the duende parent process receive a TERM or INT
       signal, duende sends all of its children TERM signals, then exits.

       The duende process must be started as the superuser; this is because Duende's intended child processes
       (maradns and zoneserver) need to bind to privileged ports, and because duende uses a setuid() call to
       change the user ID of the logging process to the user with ID 66.

Examples

       Using duende to start maradns, where the mararc file is /etc/mararc.2

       duendemaradns -f /etc/mararc.2

       Using duende to start zoneserver, where the mararc file is /etc/mararc.4

       duendezoneserver -f /etc/mararc.4

Logging

duende uses the syslog() facility to log the standard output of the program that it invokes. The name  of
       the program (in other words, the "ident" given to openlog()) defaults to log-helper but can be overridden
       with  the  --ident  argument.   All  messages  created  by  the child process are sent to syslog() with a
       priority of LOG_ALERT and a "facility" of LOG_DAEMON (daemon.info in  /etc/syslog.conf).   Should  duende
       itself encounter an error, it will send messages to syslog() with a priority of LOG_ALERT.

       Also,  the  directory  /etc/maradns/logger,  while used by duende, is not used to store any log messages.
       That is unless, for some reason, one configures syslog to store messages there.

Name

       duende - run a child process as a daemon

Options

       Most of the above behaviour can be configured by command line arguments.

       -c|--chrootdirectory
           The  log  helper  process  will  change  its  directory  and root to this location.  This defaults to
           /etc/maradns/logger.-i|--identstring
           The log helper process will use this string to identify the process when sending messages to  syslog.
           This defaults to log-help.-p|--pidfilename
           If this argument is present, the duende parent process will store its pid in this file.

       -u|--uidinteger
           The log helper process will drop its user id to this. This value defaults to 66.

       -g|--gidinteger
           The log helper process will drop its group id to this. This value defaults to 66.

       -r|--restart_oninteger
           The  log  helper  process  will  restart  the  child process if it exists with this status code. This
           defaults to 8.

See Also

maradns(8), syslog(3)http://www.maradns.org

Usage

duende [options] child_process [ arguments passed onto child ]

See Also