'Deliver the process ended event to C{self.proto}.'

def processEnded(self, status):

    self.pid = None
    statusMap = {0: ProcessDone, 1: ProcessTerminated}
    self.proto.processEnded(Failure(statusMap[status](status)))
