def getExitCode(self, command, env={}, path=None, uid=None, gid=None,
                    usePTY=0, childFDs=None):
        """Execute a command and get the return code of the finished process.
        """
        deferred = defer.Deferred()
        processProtocol = _SummaryProcessProtocol(deferred)
        self.execute(processProtocol, command, env, path, uid, gid,
                     usePTY, childFDs)
        @deferred.addCallback
        def getStdOut(tuple_):
            _stdout, _stderr, exitCode = tuple_
            return exitCode
        return deferred
Execute a command and get the return code of the finished process.