'If the process ends with L{error.ProcessDone}, this method calls the
L{IProtocol} provider\'s L{connectionLost} with a
L{error.ConnectionDone}
@see: L{ProcessProtocol.processEnded}'

def processEnded(self, reason):

    if ((reason.check(error.ProcessDone) == error.ProcessDone) and (reason.value.status == 0)):
        return self.protocol.connectionLost(Failure(error.ConnectionDone()))
    else:
        return self.protocol.connectionLost(reason)
