persistent process supervision
rundeux(8)                         runtools                         rundeux(8)



NAME
       rundeux - run a program with an associated logger

SYNOPSIS
       rundeux [-hV] [-d] [-L label ] [-S sep ] [-x] program <'::'|'sep'> log-
       ger

DESCRIPTION
       program and logger may each be one or more arguments.  They  are  sepa-
       rated  by  the  verbatim  string ``::'', or by the sep argument defined
       with the -S option.

       rundeux starts program and logger with the stdout of program  connected
       to the stdin of logger.  Normally program is intended to be a long-run-
       ning process, and logger is a program that logs the data  it  reads  on
       its  standard  input.   Both program and logger should be set up to run
       under supervision as foreground processes.

       After starting, rundeux continues to monitor both program  and  logger.
       If  either process should terminate, rundeux restarts it.  When rundeux
       itself receives any signal it can catch, it passes  it  on  to  program
       with the kill(2) command.

       If rundeux receives SIGTERM, it flags itself to terminate and initiates
       a shutdown sequence.  It sends SIGTERM and SIGCONT to program and waits
       for  it to terminate.  It then closes the stdin of logger and waits for
       it to terminate.  Then rundeux itself exits normally.

OPTIONS
       -d     Detach.  Normally rundeux itself runs as a  foreground  process.
              The  -d  option  may  be  used  to  run  rundeux as a background
              process, in its own session and process group, detached from the
              controlling terminal.

       -h     Help.  Print a brief usage message to stderr and exit.

       -L label
              Label.  May be used to provide label as a distinctive tag for an
              instance of rundeux, such as for reference  in  ps(1)  listings.
              Otherwise, this option has no effect.

       -S sep Separator.   Normally the program and logger arguments are sepa-
              rated by the verbatim string ``::''.  This option may be used to
              specify sep as an alternative separator string.

       -V     Version.  Print the version number to stderr and exit.

       -x     Exit.   Normally  rundeux  itself  stays  resident  as  a system
              process that monitors program and logger.  The -x option  causes
              rundeux  to  start logger, and then replace itself with the pro-
              gram process.  In this case, program  and  logger  will  run  as
              unsupervised processes.  May be combined with the -d option.

SIGNALS
       When rundeux receives any catchable signal, it passes that signal on to
       the program under its supervision.

       If rundeux receives SIGTERM, it takes it as a shutdown command and per-
       forms the following sequence:

       o   Send  SIGTERM  and  SIGCONT signals to the program process and wait
           for it to terminate.

       o   Close the stdin of the logger process and wait for it to terminate.

       o   rundeux itself then exits normally.

AUTHOR
       Wayne Marshall, http://b0llix.net/perp/

SEE ALSO
       runtools_intro(8),  runargs(8), runargv0(8), runchoom(8), rundetach(8),
       runenv(8),   runfile(8),    runlimit(8),    runlock(8),    runpause(8),
       runsession(8), runtool(8), runtrap(8), runuid(8)



runtools-2.07                    January 2013                       rundeux(8)