Пример #1
0
 def connect(self, protocolFactory):
    """
    See base class.
    """
    proto = protocolFactory.buildProtocol(_ProcessAddress())
    try:
       wrapped = _WorkerWrapIProtocol(proto, self._executable, self._errFlag)
       wrapped._worker = self._worker
       self._spawnProcess(wrapped,
          self._executable, self._args, self._env, self._path, self._uid,
          self._gid, self._usePTY, self._childFDs)
    except:
       return defer.fail()
    else:
       return defer.succeed(proto)
Пример #2
0
 def connect(self, protocolFactory):
     """
     See base class.
     """
     proto = protocolFactory.buildProtocol(_ProcessAddress())
     try:
         wrapped = _WorkerWrapIProtocol(proto, self._executable,
                                        self._errFlag)
         wrapped._worker = self._worker
         self._spawnProcess(wrapped, self._executable, self._args,
                            self._env, self._path, self._uid, self._gid,
                            self._usePTY, self._childFDs)
     except:
         return defer.fail()
     else:
         return defer.succeed(proto)
Пример #3
0
 def connect(self, protocolFactory):
     proto = protocolFactory.buildProtocol(_ProcessAddress())
     try:
         wrapped = _CustomWrapIProtocol(proto, self._executable, self._errFlag)
         wrapped._name = self._name
         self._spawnProcess(
             wrapped,
             self._executable,
             self._args,
             self._env,
             self._path,
             self._uid,
             self._gid,
             self._usePTY,
             self._childFDs,
         )
     except:
         return defer.fail()
     else:
         return defer.succeed(proto)