'Callback C{self.deferred} with L{None} if C{reason} is a
L{error.ProcessTerminated} failure with C{exitCode} set to 1.
Otherwise, errback with a C{ValueError} describing the problem.'

def processEnded(self, reason):

    if (not reason.check(error.ProcessTerminated)):
        return self.deferred.errback(ValueError(('wrong    termination:    %s' % (reason,))))
    v = reason.value
    if (v.exitCode != 1):
        return self.deferred.errback(ValueError(('Wrong    exit    code:    %s' % (v.exitCode,))))
    self.deferred.callback(None)
