persistent process supervision
runpause(8)                        runtools                        runpause(8)

       runpause - run a program after a specified delay

       runpause [-hV] [-L label ] secs program [ args ...  ]

       runpause  sleeps  for secs (or until interrupted by a signal), and then
       runs program with any arguments given in args.

       If secs is 0, runpause will pause forever, or until  interrupted  by  a

       If program does not contain a ``/'' slash character, runpause will per-
       form a shell-like search for the executable using the PATH variable  in
       the current environment.

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

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

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

       The runpause utility may be used to hack a perpetrate(5) service out of
       what would normally be a system initialization:

              exec 2>&1

              if test ${1} = 'start' ; then
                # startup network:
                echo "starting network ..."
                ifconfig ...
                # maintain persistent state for this service:
                exec runpause -L network 0 /bin/true

              if test ${1} = 'reset' ; then
                # take down network and whatever depends on it:
                echo "resetting network ..."

              ### EOF

       The author does not recommend this sort of thing and will never mention
       it again.

       runpause exits with one of the following values:

       0      program  was  invoked and completed successfully.  In this case,
              the exit code is returned by the program, rather  than  by  run-
              pause itself.

       100    runpause  failed  because  of  a usage error, such as an invalid
              command-line option or argument.  In this case, runpause  prints
              a brief error message and usage help to stderr on exit.

       111    runpause  failed  due to some system or resource error.  In this
              case, runpause prints a brief diagnostic message  to  stderr  on

       1-127  program  was  invoked and failed with its own non-zero exit sta-

       Wayne Marshall,

       runtools_intro(8), runargs(8), runargv0(8), runchoom(8),  rundetach(8),
       rundeux(8),    runenv(8),    runfile(8),    runlimit(8),    runlock(8),
       runsession(8),    runtool(8),    runtrap(8),    runuid(8),    perpd(8),

runtools-2.07                    January 2013                      runpause(8)