runpause(8)

NAME
runpause - run a program after a specified delay

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

DESCRIPTION
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 signal.

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

OPTIONS

-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.

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

    #!/bin/sh
    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
    fi
    if test ${1} = 'reset' ; then
      # take down network and whatever depends on it:
      echo "resetting network ..."
      ...
    fi
    ### EOF

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

EXIT STATUS
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 runpause 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 exit.

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

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

SEE ALSO
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), perpetrate(5)