'Called when the process has ended.
@param reason: a Failure giving the reason for the process\' end.'

def processEnded(self, reason):

    if (reason.value.exitCode != 0):
        self._getDeferred().errback(ConchError('exit    code    was    not    0:    {}'.format(reason.value.exitCode)))
    else:
        buf = self.buf.replace('\r\n', '\n')
        self._getDeferred().callback(buf)
