'Set up the parameters of a new runner.
The `app` argument must have the following attributes:
* `stdin_path`, `stdout_path`, `stderr_path`: Filesystem
paths to open and replace the existing `sys.stdin`,
`sys.stdout`, `sys.stderr`.
* `pidfile_path`: Absolute filesystem path to a file that
will be used as the PID file for the daemon. If
``None``, no PID file will be used.
* `pidfile_timeout`: Used as the default acquisition
timeout value supplied to the runner\'s PID lock file.
* `run`: Callable that will be invoked when the daemon is
started.'

def __init__(self, app):

    self.parse_args()
    self.app = app
    self.daemon_context = DaemonContext()
    self.daemon_context.stdin = open(app.stdin_path, 'r')
    self.daemon_context.stdout = open(app.stdout_path, 'w+')
    self.daemon_context.stderr = open(app.stderr_path, 'w+', buffering=0)
    self.pidfile = None
    if (app.pidfile_path is not None):
        self.pidfile = make_pidlockfile(app.pidfile_path, app.pidfile_timeout)
    self.daemon_context.pidfile = self.pidfile
