'To be called after the application is created: start the application
and run the reactor. After the reactor stops, clean up PID files and
such.'

def postApplication(self):

    try:
        self.startApplication(self.application)
    except Exception as ex:
        statusPipe = self.config.get('statusPipe', None)
        if (statusPipe is not None):
            message = self._formatChildException(ex)
            untilConcludes(os.write, statusPipe, message)
            untilConcludes(os.close, statusPipe)
        self.removePID(self.config['pidfile'])
        raise
    else:
        statusPipe = self.config.get('statusPipe', None)
        if (statusPipe is not None):
            untilConcludes(os.write, statusPipe, '0')
            untilConcludes(os.close, statusPipe)
    self.startReactor(None, self.oldstdout, self.oldstderr)
    self.removePID(self.config['pidfile'])
